diff options
author | Chia-chi Yeh <chiachi@android.com> | 2012-04-16 13:06:29 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-04-16 15:15:55 +0530 |
commit | fb38fa123df1d518f4539953fbda55ad22bb8b15 (patch) | |
tree | 548e05727408f577fc08908bbf26ff01e390c1a9 /security | |
parent | a11cef7303186be236e7ac30b7895b60ca3748ea (diff) |
security: Add AID_NET_RAW and AID_NET_ADMIN capability check in cap_capable().
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
Conflicts:
security/commoncap.c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/commoncap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 2b07d91e9e46..5cbb55ec6e43 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -79,12 +79,11 @@ int cap_netlink_send(struct sock *sk, struct sk_buff *skb) int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, int cap, int audit) { -#ifdef CONFIG_ANDROID_PARANOID_NETWORK if (cap == CAP_NET_RAW && in_egroup_p(AID_NET_RAW)) return 0; if (cap == CAP_NET_ADMIN && in_egroup_p(AID_NET_ADMIN)) return 0; -#endif + for (;;) { /* The creator of the user namespace has all caps. */ if (targ_ns != &init_user_ns && targ_ns->creator == cred->user) |