aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Abgrall2013-02-20 19:39:53 -0600
committerArve Hjønnevåg2013-02-22 17:27:34 -0600
commitfa0836860e89d3ae6cc6d28918de2a8495656ed1 (patch)
treea7f7e0b2accc8a2be71aa1b2d390df816165510e
parent1b9a7bf534a41b6df8320f58ccb963488035882d (diff)
downloadkernel-common-fa0836860e89d3ae6cc6d28918de2a8495656ed1.tar.gz
kernel-common-fa0836860e89d3ae6cc6d28918de2a8495656ed1.tar.xz
kernel-common-fa0836860e89d3ae6cc6d28918de2a8495656ed1.zip
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 @@
17#define _LINUX_ANDROID_AID_H 17#define _LINUX_ANDROID_AID_H
18 18
19/* AIDs that the kernel treats differently */ 19/* AIDs that the kernel treats differently */
20#define AID_NET_BT_ADMIN 3001 20#define AID_OBSOLETE_000 3001 /* was NET_BT_ADMIN */
21#define AID_NET_BT 3002 21#define AID_OBSOLETE_001 3002 /* was NET_BT */
22#define AID_INET 3003 22#define AID_INET 3003
23#define AID_NET_RAW 3004 23#define AID_NET_RAW 3004
24#define AID_NET_ADMIN 3005 24#define AID_NET_ADMIN 3005
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index ca21d11fe15..49a70855727 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -30,10 +30,6 @@
30#include <net/bluetooth/bluetooth.h> 30#include <net/bluetooth/bluetooth.h>
31#include <linux/proc_fs.h> 31#include <linux/proc_fs.h>
32 32
33#ifdef CONFIG_ANDROID_PARANOID_NETWORK
34#include <linux/android_aid.h>
35#endif
36
37#ifndef CONFIG_BT_SOCK_DEBUG 33#ifndef CONFIG_BT_SOCK_DEBUG
38#undef BT_DBG 34#undef BT_DBG
39#define BT_DBG(D...) 35#define BT_DBG(D...)
@@ -121,15 +117,15 @@ int bt_sock_unregister(int proto)
121} 117}
122EXPORT_SYMBOL(bt_sock_unregister); 118EXPORT_SYMBOL(bt_sock_unregister);
123 119
124#ifdef CONFIG_ANDROID_PARANOID_NETWORK 120#ifdef CONFIG_PARANOID_NETWORK
125static inline int current_has_bt_admin(void) 121static inline int current_has_bt_admin(void)
126{ 122{
127 return (!current_euid() || in_egroup_p(AID_NET_BT_ADMIN)); 123 return !current_euid();
128} 124}
129 125
130static inline int current_has_bt(void) 126static inline int current_has_bt(void)
131{ 127{
132 return (current_has_bt_admin() || in_egroup_p(AID_NET_BT)); 128 return current_has_bt_admin();
133} 129}
134# else 130# else
135static inline int current_has_bt_admin(void) 131static inline int current_has_bt_admin(void)