bc: convert to "G trick" - this returns bc to zero bss increase
[oweals/busybox.git] / util-linux / unshare.c
index 6a3da9f91bfb63ade47a0f134f28a88176646e07..fffee28a0972b7913bbcee4a9c1e00abe3580af8 100644 (file)
@@ -73,7 +73,7 @@
 #include "libbb.h"
 
 static void mount_or_die(const char *source, const char *target,
-                 const char *fstype, unsigned long mountflags)
+               const char *fstype, unsigned long mountflags)
 {
        if (mount(source, target, fstype, mountflags, NULL)) {
                bb_perror_msg_and_die("can't mount %s on %s (flags:0x%lx)",
@@ -217,7 +217,7 @@ int unshare_main(int argc UNUSED_PARAM, char **argv)
                ":\xf3""n"
                ":\xf4""p"
                ":\xf5""U"
-               ":ru"      /* --map-root-user or -r implies -u */
+               ":rU"      /* --map-root-user or -r implies -U */
                ":\xfd""m" /* --mount-proc implies -m */
                , unshare_longopts,
                &proc_mnt_target, &prop_str, &setgrp_str,
@@ -339,7 +339,7 @@ int unshare_main(int argc UNUSED_PARAM, char **argv)
        }
 
        if (opts & OPT_map_root) {
-               char uidmap_buf[sizeof("%u 0 1") + sizeof(int)*3];
+               char uidmap_buf[sizeof("0 %u 1") + sizeof(int)*3];
 
                /*
                 * Since Linux 3.19 unprivileged writing of /proc/self/gid_map
@@ -348,9 +348,9 @@ int unshare_main(int argc UNUSED_PARAM, char **argv)
                 * in that user namespace.
                 */
                xopen_xwrite_close(PATH_PROC_SETGROUPS, "deny");
-               sprintf(uidmap_buf, "%u 0 1", (unsigned)reuid);
+               sprintf(uidmap_buf, "0 %u 1", (unsigned)reuid);
                xopen_xwrite_close(PATH_PROC_UIDMAP, uidmap_buf);
-               sprintf(uidmap_buf, "%u 0 1", (unsigned)regid);
+               sprintf(uidmap_buf, "0 %u 1", (unsigned)regid);
                xopen_xwrite_close(PATH_PROC_GIDMAP, uidmap_buf);
        } else
        if (setgrp_str) {