Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc76f0ea authored by Jorge Lucangeli Obes's avatar Jorge Lucangeli Obes Committed by Elliott Hughes
Browse files

run-as: Keep supplementary groups.

This broke TCP debugging because processes don't inherit the AID_INET
group.

Bug: 67058466
Test: adb shell run-as com.example.native_activity groups prints "inet".

(cherry picked from commit 8c27e19c)

Change-Id: I30bc3152267a2b3ee099bc9f604c017ef33dd685
parent 2f00c80c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ int main(int argc, char* argv[]) {
  ScopedMinijail j(minijail_new());
  minijail_change_uid(j.get(), uid);
  minijail_change_gid(j.get(), gid);
  minijail_keep_supplementary_gids(j.get());
  minijail_enter(j.get());

  if (selinux_android_setcontext(uid, 0, info.seinfo, pkgname) < 0) {