aboutsummaryrefslogtreecommitdiff
path: root/selinux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-12 10:41:23 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-12 10:41:23 +0000
commit955bccc94fa77f0283930dc271e27c02526ca52f (patch)
treee46db35de999178330e88c50b3911bc798365f39 /selinux
parent1203c9bf2f63938f7766a3022a9659b25712824f (diff)
downloadbusybox-955bccc94fa77f0283930dc271e27c02526ca52f.tar.gz
chcon: exclude constraints for impossible option if long opts are off
Diffstat (limited to 'selinux')
-rw-r--r--selinux/chcon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/selinux/chcon.c b/selinux/chcon.c
index d7ff40816..b7d7d5a9e 100644
--- a/selinux/chcon.c
+++ b/selinux/chcon.c
@@ -133,9 +133,12 @@ int chcon_main(int argc, char *argv[])
#if ENABLE_FEATURE_CHCON_LONG_OPTIONS
applet_long_options = chcon_options;
#endif
- opt_complementary = "-1" /* at least 1 param */
- ":?:f--v:v--f" /* 'verbose' and 'quiet' are exclusive */
- ":\xff--urtl:u--\xff:r--\xff:t--\xff:l--\xff";
+ opt_complementary = "-1" /* at least 1 param */
+ ":?" /* error if exclusivity constraints are violated */
+#if ENABLE_FEATURE_CHCON_LONG_OPTIONS
+ ":\xff--urtl:u--\xff:r--\xff:t--\xff:l--\xff"
+#endif
+ ":f--v:v--f"; /* 'verbose' and 'quiet' are exclusive */
getopt32(argc, argv, "Rchf:u:r:t:l:v",
&user, &role, &type, &range, &reference_file);
argv += optind;