[go: nahoru, domu]

Don't PCHECK() in SetGidAndUidMaps

CanCreateProcessInNewUserNS() forks and the child process checks if
processes can be created in a new user namespace.  It winds up calling
SetGidAndUidMaps(), which had a PCHECK() that can get triggered under
some unknown conditions that shows up in our crash reports.  This
PCHECK() causes the forked child to crash, and because of this, Chrome
correctly concludes that it cannot create processes in a new user NS.

This behavior is correct, but we would like for these crashes to not
be reported to us.  This CL changes the PCHECK() to a 'return false'.
There are only 2 usages of SetGidAndUidMaps(), and one of them
_exit(1)'s on failure, while the other has a PCHECK(), so this CL
shouldn't change any functional behavior.

BUG=685717
R=jorgelo@chromium.org

Change-Id: I6bb7c86fbe63737b879feaa01bbe14ce9c009197
Reviewed-on: https://chromium-review.googlesource.com/633907
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497149}
1 file changed