aboutsummaryrefslogtreecommitdiff
path: root/coreutils/id.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/id.c')
-rw-r--r--coreutils/id.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/coreutils/id.c b/coreutils/id.c
index 6043bca61..5a7fb9aaf 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -170,9 +170,12 @@ int id_main(int argc UNUSED_PARAM, char **argv)
} else {
/* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
/* Don't allow more than one username */
- opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
- IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
- opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
+ opt = getopt32(argv, "^"
+ "rnugG" IF_SELINUX("Z")
+ "\0"
+ "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
+ IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G")
+ );
}
username = argv[optind];