aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c4
-rw-r--r--racoon.rc5
2 files changed, 3 insertions, 6 deletions
diff --git a/main.c b/main.c
index c5e6736..524155a 100644
--- a/main.c
+++ b/main.c
@@ -177,10 +177,6 @@ int main(int argc, char **argv)
#ifdef ANDROID_CHANGES
shutdown(control, SHUT_WR);
- if (setuid(AID_VPN) != 0) {
- do_plog(LLV_ERROR, "setuid(AID_VPN) failed\n");
- exit(1);
- }
#endif
while (1) {
diff --git a/racoon.rc b/racoon.rc
index 2feb5ae..fdb8823 100644
--- a/racoon.rc
+++ b/racoon.rc
@@ -1,8 +1,9 @@
service racoon /system/bin/racoon
class main
socket racoon stream 600 system system
- # IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
+ # IKE uses UDP port 500.
+ user vpn
group vpn inet
- capabilities NET_ADMIN
+ capabilities NET_ADMIN NET_BIND_SERVICE NET_RAW
disabled
oneshot