From: JP Abgrall Date: Thu, 21 Feb 2013 01:39:53 +0000 (-0800) Subject: net: bluetooth: Remove the AID_NET_BT* gid numbers X-Git-Tag: firefly_0821_release~4090^2~600 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2b6cc26b6b84fa02e49c9440737835428740e272;p=firefly-linux-kernel-4.4.55.git net: bluetooth: Remove the AID_NET_BT* gid numbers Removed bluetooth checks for AID_NET_BT and AID_NET_BT_ADMIN which are not useful anymore. This is in preparation for getting rid of all the AID_* gids. Signed-off-by: JP Abgrall --- diff --git a/include/linux/android_aid.h b/include/linux/android_aid.h index 0f904b3ba7f0..06264b8be5f0 100644 --- a/include/linux/android_aid.h +++ b/include/linux/android_aid.h @@ -17,8 +17,8 @@ #define _LINUX_ANDROID_AID_H /* AIDs that the kernel treats differently */ -#define AID_NET_BT_ADMIN 3001 -#define AID_NET_BT 3002 +#define AID_OBSOLETE_000 3001 /* was NET_BT_ADMIN */ +#define AID_OBSOLETE_001 3002 /* was NET_BT */ #define AID_INET 3003 #define AID_NET_RAW 3004 #define AID_NET_ADMIN 3005 diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index bd8a56d097d6..a44c12c2de4a 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c @@ -30,10 +30,6 @@ #include #include -#ifdef CONFIG_ANDROID_PARANOID_NETWORK -#include -#endif - #ifndef CONFIG_BT_SOCK_DEBUG #undef BT_DBG #define BT_DBG(D...) @@ -112,15 +108,15 @@ void bt_sock_unregister(int proto) } EXPORT_SYMBOL(bt_sock_unregister); -#ifdef CONFIG_ANDROID_PARANOID_NETWORK +#ifdef CONFIG_PARANOID_NETWORK static inline int current_has_bt_admin(void) { - return (!current_euid() || in_egroup_p(AID_NET_BT_ADMIN)); + return !current_euid(); } static inline int current_has_bt(void) { - return (current_has_bt_admin() || in_egroup_p(AID_NET_BT)); + return current_has_bt_admin(); } # else static inline int current_has_bt_admin(void)