diff options
author | Ron Yorston <rmy@pobox.com> | 2017-12-09 09:04:58 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-12-09 09:04:58 +0000 |
commit | bcf14b82e442e797fdd370afc80a82ef295ac1b0 (patch) | |
tree | 133c2b3df5445c508953fee17576ed932af07c7a /util-linux | |
parent | 65e9c0ad92a316e36efbc584b72b96a7eb8fa9db (diff) | |
parent | a07fead8235c479f428dd5265e4f3539abb9c3fe (diff) | |
download | busybox-w32-bcf14b82e442e797fdd370afc80a82ef295ac1b0.tar.gz busybox-w32-bcf14b82e442e797fdd370afc80a82ef295ac1b0.tar.bz2 busybox-w32-bcf14b82e442e797fdd370afc80a82ef295ac1b0.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/unshare.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/unshare.c b/util-linux/unshare.c index 6a3da9f91..7c295da1f 100644 --- a/util-linux/unshare.c +++ b/util-linux/unshare.c | |||
@@ -217,7 +217,7 @@ int unshare_main(int argc UNUSED_PARAM, char **argv) | |||
217 | ":\xf3""n" | 217 | ":\xf3""n" |
218 | ":\xf4""p" | 218 | ":\xf4""p" |
219 | ":\xf5""U" | 219 | ":\xf5""U" |
220 | ":ru" /* --map-root-user or -r implies -u */ | 220 | ":rU" /* --map-root-user or -r implies -U */ |
221 | ":\xfd""m" /* --mount-proc implies -m */ | 221 | ":\xfd""m" /* --mount-proc implies -m */ |
222 | , unshare_longopts, | 222 | , unshare_longopts, |
223 | &proc_mnt_target, &prop_str, &setgrp_str, | 223 | &proc_mnt_target, &prop_str, &setgrp_str, |
@@ -339,7 +339,7 @@ int unshare_main(int argc UNUSED_PARAM, char **argv) | |||
339 | } | 339 | } |
340 | 340 | ||
341 | if (opts & OPT_map_root) { | 341 | if (opts & OPT_map_root) { |
342 | char uidmap_buf[sizeof("%u 0 1") + sizeof(int)*3]; | 342 | char uidmap_buf[sizeof("0 %u 1") + sizeof(int)*3]; |
343 | 343 | ||
344 | /* | 344 | /* |
345 | * Since Linux 3.19 unprivileged writing of /proc/self/gid_map | 345 | * Since Linux 3.19 unprivileged writing of /proc/self/gid_map |
@@ -348,9 +348,9 @@ int unshare_main(int argc UNUSED_PARAM, char **argv) | |||
348 | * in that user namespace. | 348 | * in that user namespace. |
349 | */ | 349 | */ |
350 | xopen_xwrite_close(PATH_PROC_SETGROUPS, "deny"); | 350 | xopen_xwrite_close(PATH_PROC_SETGROUPS, "deny"); |
351 | sprintf(uidmap_buf, "%u 0 1", (unsigned)reuid); | 351 | sprintf(uidmap_buf, "0 %u 1", (unsigned)reuid); |
352 | xopen_xwrite_close(PATH_PROC_UIDMAP, uidmap_buf); | 352 | xopen_xwrite_close(PATH_PROC_UIDMAP, uidmap_buf); |
353 | sprintf(uidmap_buf, "%u 0 1", (unsigned)regid); | 353 | sprintf(uidmap_buf, "0 %u 1", (unsigned)regid); |
354 | xopen_xwrite_close(PATH_PROC_GIDMAP, uidmap_buf); | 354 | xopen_xwrite_close(PATH_PROC_GIDMAP, uidmap_buf); |
355 | } else | 355 | } else |
356 | if (setgrp_str) { | 356 | if (setgrp_str) { |