Files
shadow/src
Hank Leininger 884895ae25 Expand the error message when newuidmap / newgidmap do not like the user/group ownership of their target process.
Currently the error is just:

newuidmap: Target [pid] is owned by a different user

With this patch it will be like:

newuidmap: Target [pid] is owned by a different user: uid:0 pw_uid:0 st_uid:0, gid:0 pw_gid:0 st_gid:99

Why is this useful?  Well, in my case...

The grsecurity kernel-hardening patch includes an option to make parts
of /proc unreadable, such as /proc/pid/ dirs for processes not owned by
the current uid.  This comes with an option to make /proc/pid/
directories readable by a specific gid; sysadmins and the like are then
put into that group so they can see a full 'ps'.

This means that the check in new[ug]idmap fails, as in the above quoted
error - /proc/[targetpid] is owned by root, but the group is 99 so that
users in group 99 can see the process.

Some Googling finds dozens of people hitting this problem, but not
*knowing* that they have hit this problem, because the errors and
circumstances are non-obvious.

Some graceful way of handling this and not failing, will be next ;)  But
in the meantime it'd be nice to have new[ug]idmap emit a more useful
error, so that it's easier to troubleshoot.

Thanks!

Signed-off-by: Hank Leininger <hlein@korelogic.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-04-06 08:23:36 -05:00
..
2013-08-04 00:27:53 +02:00
2013-08-04 00:27:53 +02:00
2013-08-04 00:27:53 +02:00
2012-05-25 11:51:53 +00:00
2013-08-04 00:27:53 +02:00
2013-08-11 15:46:59 +02:00
2013-08-04 00:27:53 +02:00
2011-11-13 16:24:39 +00:00
2012-05-25 11:51:53 +00:00
2013-08-13 23:13:26 +02:00
2013-08-13 00:13:12 +02:00
2013-08-11 15:46:59 +02:00