[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BUGFIX] matchpathcon didn't abort, if exclusive options were given.
From:       KaiGai Kohei <kaigai () kaigai ! gr ! jp>
Date:       2007-02-26 17:45:46
Message-ID: 45E31CCA.8000102 () kaigai ! gr ! jp
[Download RAW message or body]

Hi,

This small patch fixes a bug when exclusive options were given
to matchpathcon.
The reason of this problem is lacking of '?' in opt_complementary.

This patch enables to abort, if inconsistent options are given.

Thanks,
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>

["busybox-libselinux-bugfix-matchpathcon.patch" (text/x-patch)]

Index: selinux/matchpathcon.c
===================================================================
--- selinux/matchpathcon.c	(リビジョン 17976)
+++ selinux/matchpathcon.c	(作業コピー)
@@ -36,8 +36,8 @@
 	unsigned opts;
 	char *fcontext, *prefix, *path;
 
-	opt_complementary = "-1:" /* at least one param reqd */
-		"f--p:p--f"; /* mutually exclusive */
+	opt_complementary = "-1" /* at least one param reqd */
+		":?:f--p:p--f"; /* mutually exclusive */
 	opts = getopt32(argc, argv, "nNf:p:V", &fcontext, &prefix);
 	argv += optind;
 


_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic