aboutsummaryrefslogtreecommitdiff
path: root/toys/other/usleep.c
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.net>2015-04-12 16:00:16 -0500
committerRob Landley <rob@landley.net>2015-04-12 16:00:16 -0500
commit3c0be8a473c01a23f5413c88a3aa6e60b4772e5a (patch)
treefd3732fc7edf71373bae4914ead3fc6219302182 /toys/other/usleep.c
parent776aa3cb927f889a0481c2530128940c75984feb (diff)
downloadtoybox-3c0be8a473c01a23f5413c88a3aa6e60b4772e5a.tar.gz
unshare: fix -r
Calling unshare(2) immediately puts us in the new namespace with the "overflow" user and group ID. By calling geteuid() and getegid() in handle_r() after calling unshare(), we try to map that to root, which Linux refuses to let us do. What we really want to map to root is the caller's uid/gid in the original namespace. So we have to save them before calling unshare().
Diffstat (limited to 'toys/other/usleep.c')
0 files changed, 0 insertions, 0 deletions