psss / rpms / checkpolicy

Forked from rpms/checkpolicy 5 years ago
Clone
b640f10
diff --git a/checkpolicy/checkmodule.8 b/checkpolicy/checkmodule.8
b640f10
index 40f73c5..2a7ab5c 100644
b640f10
--- a/checkpolicy/checkmodule.8
b640f10
+++ b/checkpolicy/checkmodule.8
b640f10
@@ -3,7 +3,7 @@
b640f10
 checkmodule \- SELinux policy module compiler
b640f10
 .SH SYNOPSIS
b640f10
 .B checkmodule
b640f10
-.I "[-h] [-b] [-m] [-M] [-U handle_unknown ] [-V] [-o output_file] [input_file]"
b640f10
+.I "[\-h] [\-b] [\-m] [\-M] [\-U handle_unknown ] [\-V] [\-o output_file] [input_file]"
b640f10
 .SH "DESCRIPTION"
b640f10
 This manual page describes the
b640f10
 .BR checkmodule
b640f10
@@ -12,7 +12,7 @@ command.
b640f10
 .B checkmodule
b640f10
 is a program that checks and compiles a SELinux security policy module
b640f10
 into a binary representation.  It can generate either a base policy
b640f10
-module (default) or a non-base policy module (-m option); typically,
b640f10
+module (default) or a non-base policy module (\-m option); typically,
b640f10
 you would build a non-base policy module to add to an existing module
b640f10
 store that already has a base module provided by the base policy.  Use
b640f10
 semodule_package to combine this module with its optional file
b640f10
@@ -48,7 +48,7 @@ Specify how the kernel should handle unknown classes or permissions (deny, allow
b640f10
 .SH EXAMPLE
b640f10
 .nf
b640f10
 # Build a MLS/MCS-enabled non-base policy module.
b640f10
-$ checkmodule -M -m httpd.te -o httpd.mod
b640f10
+$ checkmodule \-M \-m httpd.te \-o httpd.mod
b640f10
 .fi
b640f10
 
b640f10
 .SH "SEE ALSO"
b640f10
diff --git a/checkpolicy/checkpolicy.8 b/checkpolicy/checkpolicy.8
b640f10
index 6826938..0086bdc 100644
b640f10
--- a/checkpolicy/checkpolicy.8
b640f10
+++ b/checkpolicy/checkpolicy.8
b640f10
@@ -3,7 +3,7 @@
b640f10
 checkpolicy \- SELinux policy compiler
b640f10
 .SH SYNOPSIS
b640f10
 .B checkpolicy
b640f10
-.I "[-b] [-d] [-M] [-c policyvers] [-o output_file] [input_file]"
b640f10
+.I "[\-b] [\-d] [\-M] [\-c policyvers] [\-o output_file] [input_file]"
b640f10
 .br
b640f10
 .SH "DESCRIPTION"
b640f10
 This manual page describes the
b640f10
@@ -14,7 +14,7 @@ command.
b640f10
 is a program that checks and compiles a SELinux security policy configuration
b640f10
 into a binary representation that can be loaded into the kernel.  If no 
b640f10
 input file name is specified, checkpolicy will attempt to read from
b640f10
-policy.conf or policy, depending on whether the -b flag is specified.
b640f10
+policy.conf or policy, depending on whether the \-b flag is specified.
b640f10
 
b640f10
 .SH OPTIONS
b640f10
 .TP
b640f10
diff --git a/checkpolicy/checkpolicy.c b/checkpolicy/checkpolicy.c
b640f10
index 544f235..292f568 100644
b640f10
--- a/checkpolicy/checkpolicy.c
b640f10
+++ b/checkpolicy/checkpolicy.c
b640f10
@@ -402,7 +402,7 @@ int main(int argc, char **argv)
b640f10
 		{"binary", no_argument, NULL, 'b'},
b640f10
 		{"debug", no_argument, NULL, 'd'},
b640f10
 		{"version", no_argument, NULL, 'V'},
b640f10
-		{"handle-unknown", optional_argument, NULL, 'U'},
b640f10
+		{"handle-unknown", required_argument, NULL, 'U'},
b640f10
 		{"mls", no_argument, NULL, 'M'},
b640f10
 		{"help", no_argument, NULL, 'h'},
b640f10
 		{NULL, 0, NULL, 0}
c662668
diff --git a/checkpolicy/policy_scan.l b/checkpolicy/policy_scan.l
6bfe32f
index bba7667..ab046cc 100644
c662668
--- a/checkpolicy/policy_scan.l
c662668
+++ b/checkpolicy/policy_scan.l
7a5e44f
@@ -240,7 +240,7 @@ HIGH				{ return(HIGH); }
7a5e44f
 low |
7a5e44f
 LOW				{ return(LOW); }
7a5e44f
 "/"({alnum}|[_\.\-/])*	        { return(PATH); }
7a5e44f
-\"({alnum}|[_\.\-\+\~])+\"	{ return(FILENAME); }
6bfe32f
+\"({alnum}|[_\.\-\+\~\: ])+\"	{ return(FILENAME); }
7a5e44f
 {letter}({alnum}|[_\-])*([\.]?({alnum}|[_\-]))*	{ return(IDENTIFIER); }
7a5e44f
 {alnum}*{letter}{alnum}*        { return(FILESYSTEM); }
7a5e44f
 {digit}+|0x{hexval}+            { return(NUMBER); }
b640f10
diff --git a/checkpolicy/test/Makefile b/checkpolicy/test/Makefile
b640f10
index 0731e89..63b4d24 100644
b640f10
--- a/checkpolicy/test/Makefile
b640f10
+++ b/checkpolicy/test/Makefile
b640f10
@@ -3,7 +3,7 @@
b640f10
 #
b640f10
 PREFIX ?= $(DESTDIR)/usr
b640f10
 BINDIR=$(PREFIX)/bin
b640f10
-LIBDIR=$(PREFIX)/lib
b640f10
+LIBDIR ?= $(PREFIX)/lib
b640f10
 INCLUDEDIR ?= $(PREFIX)/include
b640f10
 
b640f10
 CFLAGS ?= -g -Wall -W -Werror -O2 -pipe