aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-05-14 19:44:59 -0700
committerSan Mehat <san@google.com>2009-05-15 10:40:29 -0700
commit4a6f2321e76685b9489d020980dffb1d9ac73fc0 (patch)
tree8cda80988b4a1ca1c1effc4e4019751895c0e681
parent5d6d417972f8d946c223c4efb9636b1ba4280543 (diff)
downloadsystem_core-4a6f2321e76685b9489d020980dffb1d9ac73fc0.zip
system_core-4a6f2321e76685b9489d020980dffb1d9ac73fc0.tar.gz
system_core-4a6f2321e76685b9489d020980dffb1d9ac73fc0.tar.bz2
init: Create new 'vpn' user/group and set owner of '/dev/tun' to it.
Signed-off-by: San Mehat <san@google.com>
-rw-r--r--include/private/android_filesystem_config.h2
-rw-r--r--init/devices.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
index a47f2e4..6ed5514 100644
--- a/include/private/android_filesystem_config.h
+++ b/include/private/android_filesystem_config.h
@@ -49,6 +49,7 @@
#define AID_MEDIA 1013 /* mediaserver process */
#define AID_DHCP 1014 /* dhcp client */
#define AID_SDCARD_RW 1015 /* external storage write access */
+#define AID_VPN 1016 /* vpn system */
#define AID_SHELL 2000 /* adb and debug shell user */
#define AID_CACHE 2001 /* cache access */
@@ -95,6 +96,7 @@ static struct android_id_info android_ids[] = {
{ "net_bt_admin", AID_NET_BT_ADMIN, },
{ "net_bt", AID_NET_BT, },
{ "sdcard_rw", AID_SDCARD_RW, },
+ { "vpn", AID_VPN, },
{ "inet", AID_INET, },
{ "net_raw", AID_NET_RAW, },
{ "misc", AID_MISC, },
diff --git a/init/devices.c b/init/devices.c
index b914c53..c278607 100644
--- a/init/devices.c
+++ b/init/devices.c
@@ -131,6 +131,7 @@ static struct perms_ devperms[] = {
{ "/dev/qmi0", 0640, AID_RADIO, AID_RADIO, 0 },
{ "/dev/qmi1", 0640, AID_RADIO, AID_RADIO, 0 },
{ "/dev/qmi2", 0640, AID_RADIO, AID_RADIO, 0 },
+ { "/dev/tun", 0640, AID_VPN , AID_VPN, 0 },
{ NULL, 0, 0, 0, 0 },
};