fcaps: clear the same personality flags as suid when fcaps are used
authorEric Paris <eparis@redhat.com>
Tue, 17 Apr 2012 20:26:54 +0000 (16:26 -0400)
committerJames Morris <james.l.morris@oracle.com>
Wed, 18 Apr 2012 02:37:56 +0000 (12:37 +1000)
commitd52fc5dde171f030170a6cb78034d166b13c9445
treef982d0bdab54d5ab31cdd3e69cb88a1376797d1f
parent09c79b60960bdd4b00916219402eabfa5e479c5a
fcaps: clear the same personality flags as suid when fcaps are used

If a process increases permissions using fcaps all of the dangerous
personality flags which are cleared for suid apps should also be cleared.
Thus programs given priviledge with fcaps will continue to have address space
randomization enabled even if the parent tried to disable it to make it
easier to attack.

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/commoncap.c