]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
unshare: fix --map-current-user short option (-c)
authorMatthew Harm Bekkema <id@mbekkema.name>
Wed, 1 Jan 2020 13:15:11 +0000 (00:15 +1100)
committerMatthew Harm Bekkema <id@mbekkema.name>
Wed, 1 Jan 2020 13:19:45 +0000 (00:19 +1100)
'c' was missing from the optstring, causing the error:

    $ unshare --user -c
    unshare: invalid option -- 'c'
    Try 'unshare --help' for more information.

Fixes: 4175f29e62 ("unshare: add --map-current-user option")
Signed-off-by: Matthew Harm Bekkema <id@mbekkema.name>
sys-utils/unshare.c

index 0558c571be2c870ef63bbf50013442a38c9db72f..8d33f2273524657fe4f48da4765f80ca34098e0a 100644 (file)
@@ -349,7 +349,7 @@ int main(int argc, char *argv[])
        textdomain(PACKAGE);
        close_stdout_atexit();
 
-       while ((c = getopt_long(argc, argv, "+fhVmuinpCUrR:w:S:G:", longopts, NULL)) != -1) {
+       while ((c = getopt_long(argc, argv, "+fhVmuinpCUrR:w:S:G:c", longopts, NULL)) != -1) {
                switch (c) {
                case 'f':
                        forkit = 1;