Created
February 23, 2013 17:04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig b/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig | |
index aba0bd9..ff28407 100644 | |
--- a/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig | |
+++ b/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig | |
@@ -439,3 +439,20 @@ CONFIG_CRYPTO_MD4=y | |
CONFIG_CRYPTO_SHA256=y | |
CONFIG_CRYPTO_TWOFISH=y | |
CONFIG_CRC_CCITT=y | |
+CONFIG_SYSVIPC=y | |
+CONFIG_NAMESPACES=y | |
+CONFIG_UTS_NS=y | |
+CONFIG_IPC_NS=y | |
+CONFIG_USER_NS=y | |
+CONFIG_PID_NS=y | |
+CONFIG_NET_NS=y | |
+CONFIG_DEVTMPFS=y | |
+CONFIG_DEVPTS_MULTIPLE_INSTANCES=y | |
+CONFIG_FSNOTIFY=y | |
+CONFIG_DNOTIFY=y | |
+CONFIG_INOTIFY_USER=y | |
+CONFIG_FANOTIFY=y | |
+CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y | |
+CONFIG_FSNOTIFY=y | |
+CONFIG_SWAP=y | |
+# CONFIG_ANDROID_PARANOID_NETWORK is not set | |
\ No newline at end of file | |
diff --git a/security/commoncap.c b/security/commoncap.c | |
index ccfe568..8bfbd13 100644 | |
--- a/security/commoncap.c | |
+++ b/security/commoncap.c | |
@@ -88,10 +88,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. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment