summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Lucangeli Obes <jorgelo@google.com>2016-12-28 10:59:39 -0500
committerJorge Lucangeli Obes <jorgelo@google.com>2016-12-29 14:24:43 -0500
commit1d9a51d2ebfe676f30a7d94502ca8f604eec018f (patch)
treeb811365f83e93be3f9aac51bdb6e8abf12f2be0e
parent4550f5982194e197c1f5553efc8ebbf50403f050 (diff)
downloadmtpd-1d9a51d2ebfe676f30a7d94502ca8f604eec018f.tar.gz
mtpd: Use capabilities instead of GIDs.
The 'net_admin'/'net_raw' GIDs are an Android addition that does not exist upstream. Replace them with capabilities which are an upstream feature. This will allow us to drop those kernel patches. Bug: 33938230 Test: 'start mtpd', 'cat /proc/`pgrep mtpd`/status | grep Cap'. Test: "Cap" lines show correct mask: 0000000000003000 Test: Add a VPN, enable it, mtpd starts correctly. Change-Id: I734ed1ae38e6d7d6a8ba393395a5cdb7c98dfe9e
-rw-r--r--mtpd.rc3
1 files changed, 2 insertions, 1 deletions
diff --git a/mtpd.rc b/mtpd.rc
index ff2d311..af701d5 100644
--- a/mtpd.rc
+++ b/mtpd.rc
@@ -2,6 +2,7 @@ service mtpd /system/bin/mtpd
class main
socket mtpd stream 600 system system
user vpn
- group vpn net_admin inet net_raw
+ group vpn inet
+ capabilities NET_ADMIN NET_RAW
disabled
oneshot