minijail: When pid-namespacing, init should be session leader

When running a jailed process, the init process should take
the role of process group and session leader -- otherwise
calls to check these values for processes in the namespace
may get 0 (as the actual leader is a process outside the
namespace).

BUG=None
TEST=minijail0 -p /sbin/session_manager

Change-Id: I35dc7c5ba63db57e64ad6c05018403d4b535922d
Reviewed-on: https://chromium-review.googlesource.com/238849
Trybot-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
1 file changed