Remove --default and --audit from sesearch

- Make -D == --dontaudit in sesearch
This commit is contained in:
Dan Walsh 2013-06-15 08:19:19 -04:00
parent 4dcc6b1421
commit 3caf5ed4b7
3 changed files with 80 additions and 60 deletions

73
0016-cmdline.patch Normal file
View File

@ -0,0 +1,73 @@
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 */

View File

@ -1,59 +0,0 @@
diff -up setools-3.3.7/man/replcon.1.cmdline setools-3.3.7/man/replcon.1
--- setools-3.3.7/man/replcon.1.cmdline 2007-08-02 17:16:33.000000000 -0400
+++ setools-3.3.7/man/replcon.1 2010-11-17 16:31:01.000000000 -0500
@@ -44,6 +44,8 @@ Search for files which include PATH.
.IP "-c CLASS, --class=CLASS"
Search only files of object class CLASS.
.SH OPTIONS
+.IP "-R, --regex"
+Enable regular expressions
.IP "-v, --verbose"
Display context info during replacement.
.IP "-h, --help"
diff -up setools-3.3.7/man/seinfo.1.cmdline setools-3.3.7/man/seinfo.1
--- setools-3.3.7/man/seinfo.1.cmdline 2010-05-03 12:39:02.000000000 -0400
+++ setools-3.3.7/man/seinfo.1 2010-11-17 16:23:36.000000000 -0500
@@ -76,6 +76,10 @@ There is no expanded information for thi
.IP "--nodecon[=ADDR]"
Print a list of node contexts or, if ADDR is provided, print the statement for the node with address ADDR.
There is no expanded information for this component.
+.IP "--polcap"
+Print policy capabilities.
+.IP "--permissive"
+Print permissive types.
.IP "--portcon[=PORT]"
Print a list of port contexts or, if PORT is provided, print the statement for port PORT.
There is no expanded information for this component.
@@ -93,7 +97,7 @@ These details include the types assigned
This option is not available for all component types; see the description of each component for the details this option will provide.
.IP "--stats"
Print policy statistics including policy type and version information and counts of all components and rules.
-.IP "-l"
+.IP "-l, --line-breaks"
Print line breaks when displaying constraint statements.
.IP "-h, --help"
Print help information and exit.
diff -up setools-3.3.7/seaudit/seaudit-report.c.cmdline setools-3.3.7/seaudit/seaudit-report.c
--- setools-3.3.7/seaudit/seaudit-report.c.cmdline 2010-11-17 16:09:48.000000000 -0500
+++ setools-3.3.7/seaudit/seaudit-report.c 2010-11-17 16:11:06.000000000 -0500
@@ -100,7 +100,7 @@ static void seaudit_report_info_usage(co
printf(" -s, --stdin read log data from standard input\n");
printf(" -m, --malformed include malformed log messages\n");
printf(" -o FILE, --output=FILE output to FILE\n");
- printf(" --config=FILE read configuration from FILE\n");
+ printf(" -c FILE, --config=FILE read configuration from FILE\n");
printf(" --html set output format to HTML\n");
printf(" --stylesheet=FILE HTML style sheet for formatting HTML report\n");
printf(" (ignored if --html is not given)\n");
diff -up setools-3.3.7/sediff/sediff.c.cmdline setools-3.3.7/sediff/sediff.c
--- setools-3.3.7/sediff/sediff.c.cmdline 2007-08-02 17:16:33.000000000 -0400
+++ setools-3.3.7/sediff/sediff.c 2010-11-17 16:20:01.000000000 -0500
@@ -420,7 +420,7 @@ int main(int argc, char **argv)
poldiff_t *diff = NULL;
size_t total = 0;
- while ((optc = getopt_long(argc, argv, "ctarubANDLMCRqhV", longopts, NULL)) != -1) {
+ while ((optc = getopt_long(argc, argv, "ctarubAqhV", longopts, NULL)) != -1) {
switch (optc) {
case 0:
break;

View File

@ -3,7 +3,7 @@
Name: setools
Version: %{setools_maj_ver}.%{setools_min_ver}
Release: 38%{?dist}
Release: 39%{?dist}
License: GPLv2
URL: http://oss.tresys.com/projects/setools
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -25,6 +25,7 @@ Patch12: 0012-seaudit.patch
Patch13: 0013-swig.patch
Patch14: 0014-boolsub.patch
Patch15: 0015-aliases.patch
Patch16: 0016-cmdline.patch
Summary: Policy analysis tools for SELinux
Group: System Environment/Base
@ -166,6 +167,7 @@ This package includes the following graphical tools:
%patch13 -p 1 -b .swig
%patch14 -p 2 -b .boolsub
%patch15 -p 1 -b .aliases
%patch16 -p 1 -b .cmdline
%ifarch sparc sparcv9 sparc64 s390 s390x
for file in `find . -name Makefile.am`; do
sed -i -e 's:-fpic:-fPIC:' $file;
@ -282,6 +284,10 @@ rm -rf ${RPM_BUILD_ROOT}
%postun libs-tcl -p /sbin/ldconfig
%changelog
* Thu May 16 2013 Dan Walsh <dwalsh@redhat.com> - 3.3.7-39
- Remove --default and --audit from sesearch
- Make -D == --dontaudit in sesearch
* Thu Mar 28 2013 Dan Walsh <dwalsh@redhat.com> - 3.3.7-38
- Add alias support to seinfo -t