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