aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorBin Wang <binw@marvell.com>2012-05-09 16:50:58 +0800
committerLubomir Rintel <lkundrak@v3.sk>2019-07-22 19:38:06 +0200
commit7b949e146745fa0b1bca10a3a14a1121290d49fa (patch)
treee184b9a5579db0b0eb81cffe1ab5ffe5599d8bb6 /security
parent31d5344b7f57c70f8fff90f7dbb7cb37db78ba23 (diff)
downloadlinux-mmp3-dell-ariel-7b949e146745fa0b1bca10a3a14a1121290d49fa.tar.gz
security: fix build failure without android aid
AID_NET_RAW and AID_NET_ADMIN should be reference only when CONFIG_ANDROID_PARANOID_NETWORK configured. Change-Id: I8811e138d61d5e0be8077ff47125d2b2a988ec41 Signed-off-by: Bin Wang <binw@marvell.com>
Diffstat (limited to 'security')
-rw-r--r--security/commoncap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 1322b6aa648d34..da21e7c93e451a 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -87,10 +87,12 @@ EXPORT_SYMBOL(cap_netlink_recv);
int cap_capable(struct task_struct *tsk, 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. */