aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2013-02-20 17:39:53 -0800
committerArve Hjønnevåg <arve@android.com>2013-04-29 14:43:21 -0700
commit39f76564f8422a69c3e7dc53fc07d41c7095d03f (patch)
treea2303f0ef602c078caee9658eec8bd6182af590c
parent3f06c4fa1c3a251e4d0d9ec0e4ec57b50fc3522d (diff)
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 <jpa@google.com>
-rw-r--r--include/linux/android_aid.h4
-rw-r--r--net/bluetooth/af_bluetooth.c10
2 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/android_aid.h b/include/linux/android_aid.h
index 0f904b3ba7f..06264b8be5f 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 a92e2b9a39b..2f3aedd11b2 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -30,10 +30,6 @@
#include <net/bluetooth/bluetooth.h>
#include <linux/proc_fs.h>
-#ifdef CONFIG_ANDROID_PARANOID_NETWORK
-#include <linux/android_aid.h>
-#endif
-
#ifndef CONFIG_BT_SOCK_DEBUG
#undef BT_DBG
#define BT_DBG(D...)
@@ -121,15 +117,15 @@ int 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)