af4b0e
diff -up setools-3.3.7/man/sesearch.1.cmdline setools-3.3.7/man/sesearch.1
af4b0e
--- setools-3.3.7/man/sesearch.1.cmdline	2008-02-22 14:06:28.000000000 -0500
af4b0e
+++ setools-3.3.7/man/sesearch.1	2013-06-15 08:47:02.099728083 -0400
3caf5e
@@ -43,7 +43,7 @@ Search for allow rules.
3caf5e
 Search for neverallow rules.
3caf5e
 .IP "--auditallow"
3caf5e
 Search for auditallow rules.
3caf5e
-.IP "--dontaudit"
3caf5e
+.IP "-D, --dontaudit"
3caf5e
 Search for dontaudit rules.
3caf5e
 .IP "-T, --type"
3caf5e
 Search for type_transition, type_member, and type_change rules.
af4b0e
diff -up setools-3.3.7/secmds/sesearch.c.cmdline setools-3.3.7/secmds/sesearch.c
af4b0e
--- setools-3.3.7/secmds/sesearch.c.cmdline	2013-06-15 08:47:02.096728078 -0400
af4b0e
+++ setools-3.3.7/secmds/sesearch.c	2013-06-17 13:41:01.623234084 -0400
af4b0e
@@ -24,6 +24,7 @@
af4b0e
  */
af4b0e
 
af4b0e
 #include <config.h>
af4b0e
+#include <selinux/selinux.h>
af4b0e
 
af4b0e
 /* libapol */
af4b0e
 #include <apol/policy.h>
af4b0e
@@ -61,9 +62,8 @@ enum opt_values
3caf5e
 static struct option const longopts[] = {
3caf5e
 	{"allow", no_argument, NULL, 'A'},
3caf5e
 	{"neverallow", no_argument, NULL, RULE_NEVERALLOW},
3caf5e
-	{"audit", no_argument, NULL, RULE_AUDIT},
3caf5e
 	{"auditallow", no_argument, NULL, RULE_AUDITALLOW},
3caf5e
-	{"dontaudit", no_argument, NULL, RULE_DONTAUDIT},
af4b0e
+	{"dontaudit", no_argument, NULL, 'D'},
3caf5e
 	{"type", no_argument, NULL, 'T'},
3caf5e
 	{"role_allow", no_argument, NULL, RULE_ROLE_ALLOW},
3caf5e
 	{"role_trans", no_argument, NULL, RULE_ROLE_TRANS},
af4b0e
@@ -72,7 +72,6 @@ static struct option const longopts[] =
3caf5e
 
3caf5e
 	{"source", required_argument, NULL, 's'},
3caf5e
 	{"target", required_argument, NULL, 't'},
3caf5e
-	{"default", required_argument, NULL, 'D'},
3caf5e
 	{"role_source", required_argument, NULL, EXPR_ROLE_SOURCE},
3caf5e
 	{"role_target", required_argument, NULL, EXPR_ROLE_TARGET},
3caf5e
 	{"class", required_argument, NULL, 'c'},
af4b0e
@@ -666,10 +665,6 @@ static void print_ft_results(const apol_
af4b0e
 	size_t i, num_filename_trans = 0;
af4b0e
 	const qpol_filename_trans_t *filename_trans = NULL;
af4b0e
 	char *tmp = NULL, *filename_trans_str = NULL, *expr = NULL;
af4b0e
-	char enable_char = ' ', branch_char = ' ';
af4b0e
-	qpol_iterator_t *iter = NULL;
af4b0e
-	const qpol_cond_t *cond = NULL;
af4b0e
-	uint32_t enabled = 0, list = 0;
af4b0e
 
af4b0e
 	if (!(num_filename_trans = apol_vector_get_size(v)))
af4b0e
 		goto cleanup;
af4b0e
@@ -677,7 +672,6 @@ static void print_ft_results(const apol_
af4b0e
 	fprintf(stdout, "Found %zd named file transition filename_trans:\n", num_filename_trans);
af4b0e
 
af4b0e
 	for (i = 0; i < num_filename_trans; i++) {
af4b0e
-		enable_char = branch_char = ' ';
af4b0e
 		if (!(filename_trans = apol_vector_get_element(v, i)))
af4b0e
 			goto cleanup;
af4b0e
 
af4b0e
@@ -962,7 +956,7 @@ int main(int argc, char **argv)
3caf5e
 
3caf5e
 	memset(&cmd_opts, 0, sizeof(cmd_opts));
3caf5e
 	cmd_opts.indirect = true;
3caf5e
-	while ((optc = getopt_long(argc, argv, "ATs:t:c:p:b:dD:RnSChV", longopts, NULL)) != -1) {
3caf5e
+	while ((optc = getopt_long(argc, argv, "ATs:t:c:p:b:dDRnSChV", longopts, NULL)) != -1) {
3caf5e
 		switch (optc) {
3caf5e
 		case 0:
3caf5e
 			break;
af4b0e
@@ -978,18 +972,6 @@ int main(int argc, char **argv)
3caf5e
 				exit(1);
3caf5e
 			}
3caf5e
 			break;
3caf5e
-		case 'D':	       /* source */
3caf5e
-			if (optarg == 0) {
3caf5e
-				usage(argv[0], 1);
3caf5e
-				printf("Missing source default type for -D (--default)\n");
3caf5e
-				exit(1);
3caf5e
-			}
3caf5e
-			cmd_opts.default_name = strdup(optarg);
3caf5e
-			if (!cmd_opts.default_name) {
3caf5e
-		
3caf5e
-				exit(1);
3caf5e
-			}
3caf5e
-			break;
3caf5e
 		case 't':	       /* target */
3caf5e
 			if (optarg == 0) {
3caf5e
 				usage(argv[0], 1);
af4b0e
@@ -1082,7 +1064,7 @@ int main(int argc, char **argv)
3caf5e
 		case RULE_AUDITALLOW:
3caf5e
 			cmd_opts.auditallow = true;
3caf5e
 			break;
3caf5e
-		case RULE_DONTAUDIT:
3caf5e
+		case 'D':
3caf5e
 			cmd_opts.dontaudit = true;
3caf5e
 			break;
3caf5e
 		case 'T':	       /* type */