diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-24 16:38:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-24 16:38:19 -0400 |
commit | b0ca118dbacbc6c35e15f216e25e95cca7aedf5b (patch) | |
tree | 6c61c91ff0174c8774d4010b892ecf0bed560910 /security/commoncap.c | |
parent | 2bb732cdb48d271ff7a910260ffb851fb4bc8a28 (diff) | |
parent | b7b57551bbda1390959207f79f2038aa7adb72ae (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (43 commits)
TOMOYO: Fix wrong domainname validation.
SELINUX: add /sys/fs/selinux mount point to put selinuxfs
CRED: Fix load_flat_shared_library() to initialise bprm correctly
SELinux: introduce path_has_perm
flex_array: allow 0 length elements
flex_arrays: allow zero length flex arrays
flex_array: flex_array_prealloc takes a number of elements, not an end
SELinux: pass last path component in may_create
SELinux: put name based create rules in a hashtable
SELinux: generic hashtab entry counter
SELinux: calculate and print hashtab stats with a generic function
SELinux: skip filename trans rules if ttype does not match parent dir
SELinux: rename filename_compute_type argument to *type instead of *con
SELinux: fix comment to state filename_compute_type takes an objname not a qstr
SMACK: smack_file_lock can use the struct path
LSM: separate LSM_AUDIT_DATA_DENTRY from LSM_AUDIT_DATA_PATH
LSM: split LSM_AUDIT_DATA_FS into _PATH and _INODE
SELINUX: Make selinux cache VFS RCU walks safe
SECURITY: Move exec_permission RCU checks into security modules
SELinux: security_read_policy should take a size_t not ssize_t
...
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index f20e984ccfb4..a93b3b733079 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -529,15 +529,10 @@ skip: | |||
529 | new->suid = new->fsuid = new->euid; | 529 | new->suid = new->fsuid = new->euid; |
530 | new->sgid = new->fsgid = new->egid; | 530 | new->sgid = new->fsgid = new->egid; |
531 | 531 | ||
532 | /* For init, we want to retain the capabilities set in the initial | 532 | if (effective) |
533 | * task. Thus we skip the usual capability rules | 533 | new->cap_effective = new->cap_permitted; |
534 | */ | 534 | else |
535 | if (!is_global_init(current)) { | 535 | cap_clear(new->cap_effective); |
536 | if (effective) | ||
537 | new->cap_effective = new->cap_permitted; | ||
538 | else | ||
539 | cap_clear(new->cap_effective); | ||
540 | } | ||
541 | bprm->cap_effective = effective; | 536 | bprm->cap_effective = effective; |
542 | 537 | ||
543 | /* | 538 | /* |