setools/0016-cmdline.patch

74 lines
2.6 KiB
Diff
Raw Normal View History

diff -up setools-3.3.7/man/sesearch.1~ setools-3.3.7/man/sesearch.1
--- setools-3.3.7/man/sesearch.1~ 2008-02-22 14:06:28.000000000 -0500
+++ setools-3.3.7/man/sesearch.1 2013-05-16 10:28:09.150480353 -0400
@@ -43,7 +43,7 @@ Search for allow rules.
Search for neverallow rules.
.IP "--auditallow"
Search for auditallow rules.
-.IP "--dontaudit"
+.IP "-D, --dontaudit"
Search for dontaudit rules.
.IP "-T, --type"
Search for type_transition, type_member, and type_change rules.
diff -up setools-3.3.7/secmds/sesearch.c~ setools-3.3.7/secmds/sesearch.c
--- setools-3.3.7/secmds/sesearch.c~ 2013-05-16 10:18:49.214383581 -0400
+++ setools-3.3.7/secmds/sesearch.c 2013-05-16 10:27:21.423222162 -0400
@@ -61,9 +61,9 @@ enum opt_values
static struct option const longopts[] = {
{"allow", no_argument, NULL, 'A'},
{"neverallow", no_argument, NULL, RULE_NEVERALLOW},
- {"audit", no_argument, NULL, RULE_AUDIT},
+# {"audit", no_argument, NULL, RULE_AUDIT},
{"auditallow", no_argument, NULL, RULE_AUDITALLOW},
- {"dontaudit", no_argument, NULL, RULE_DONTAUDIT},
+ {"dontaudit", no_argument, NULL, "D"},
{"type", no_argument, NULL, 'T'},
{"role_allow", no_argument, NULL, RULE_ROLE_ALLOW},
{"role_trans", no_argument, NULL, RULE_ROLE_TRANS},
@@ -72,7 +72,7 @@ static struct option const longopts[] =
{"source", required_argument, NULL, 's'},
{"target", required_argument, NULL, 't'},
- {"default", required_argument, NULL, 'D'},
+# {"default", required_argument, NULL, 'D'},
{"role_source", required_argument, NULL, EXPR_ROLE_SOURCE},
{"role_target", required_argument, NULL, EXPR_ROLE_TARGET},
{"class", required_argument, NULL, 'c'},
@@ -962,7 +962,7 @@ int main(int argc, char **argv)
memset(&cmd_opts, 0, sizeof(cmd_opts));
cmd_opts.indirect = true;
- while ((optc = getopt_long(argc, argv, "ATs:t:c:p:b:dD:RnSChV", longopts, NULL)) != -1) {
+ while ((optc = getopt_long(argc, argv, "ATs:t:c:p:b:dDRnSChV", longopts, NULL)) != -1) {
switch (optc) {
case 0:
break;
@@ -978,18 +978,6 @@ int main(int argc, char **argv)
exit(1);
}
break;
- case 'D': /* source */
- if (optarg == 0) {
- usage(argv[0], 1);
- printf("Missing source default type for -D (--default)\n");
- exit(1);
- }
- cmd_opts.default_name = strdup(optarg);
- if (!cmd_opts.default_name) {
-
- exit(1);
- }
- break;
case 't': /* target */
if (optarg == 0) {
usage(argv[0], 1);
@@ -1082,7 +1070,7 @@ int main(int argc, char **argv)
case RULE_AUDITALLOW:
cmd_opts.auditallow = true;
break;
- case RULE_DONTAUDIT:
+ case 'D':
cmd_opts.dontaudit = true;
break;
case 'T': /* type */