4ff3f0
--- /dev/null	2005-04-20 05:34:52.522685192 -0400
4ff3f0
+++ libselinux-1.23.7/man/man3/selinux_policy_root.3	2005-04-21 09:54:24.000000000 -0400
ce82f5
@@ -0,0 +1,17 @@
ce82f5
+.TH "selinux_policy_root" "3" "25 May 2004" "dwalsh@redhat.com" "SE Linux API documentation"
ce82f5
+.SH "NAME"
ce82f5
+selinux_policy_root \- return the path of the SELinux policy files for this machine.
ce82f5
+.SH "SYNOPSIS"
ce82f5
+.B #include <selinux selinux.h="">
ce82f5
+.sp
ce82f5
+.B char *selinux_policy_root();
ce82f5
+.br
ce82f5
+
ce82f5
+.SH "DESCRIPTION"
ce82f5
+.B selinux_policy_root
ce82f5
+Reads the contents of the /etc/selinux/config file to determine which policy files should be used for this machine.
ce82f5
+.SH "RETURN VALUE"
ce82f5
+On success, returns a directory path containing the SELinux policy files.
ce82f5
+On failure, NULL is returned.
ce82f5
+
ce82f5
+
4ff3f0
--- libselinux-1.23.7/man/man8/matchpathcon.8.rhat	2005-04-21 10:05:45.000000000 -0400
4ff3f0
+++ libselinux-1.23.7/man/man8/matchpathcon.8	2005-04-21 10:12:24.000000000 -0400
4ff3f0
@@ -0,0 +1,20 @@
4ff3f0
+.TH "matchpathcon" "8" "21 April 2005" "dwalsh@redhat.com" "SE Linux Command Line documentation"
4ff3f0
+.SH "NAME"
4ff3f0
+matchpathcon \- get the default security context for the specified path from the file contexts configuration.
4ff3f0
+
4ff3f0
+.SH "SYNOPSIS"
4ff3f0
+.B matchpathcon [-n] filepath...
4ff3f0
+
4ff3f0
+.SH "DESCRIPTION"
4ff3f0
+.B matchpathcon
4ff3f0
+Prints the file path and the default security context associated with it.
4ff3f0
+.br
4ff3f0
+If the -n option is given, do not display path.
4ff3f0
+
4ff3f0
+.SH AUTHOR	
4ff3f0
+This manual page was written by Dan Walsh <dwalsh@redhat.com>.
4ff3f0
+.br
4ff3f0
+The program was written by NSA
4ff3f0
+
4ff3f0
+.SH "SEE ALSO"
4ff3f0
+.BR mathpathcon "(3), " 
4ff3f0
--- libselinux-1.23.7/utils/matchpathcon.c.rhat	2005-04-13 11:34:19.000000000 -0400
4ff3f0
+++ libselinux-1.23.7/utils/matchpathcon.c	2005-04-21 10:02:04.000000000 -0400
4ff3f0
@@ -1,25 +1,43 @@
4ff3f0
 #include <unistd.h>
4ff3f0
 #include <stdio.h>
4ff3f0
 #include <stdlib.h>
4ff3f0
+#include <getopt.h>
4ff3f0
 #include <selinux selinux.h="">
4ff3f0
 
4ff3f0
+void usage(const char *progname) 
4ff3f0
+{
4ff3f0
+	fprintf(stderr, "usage:  %s [-n] path...\n", progname);
4ff3f0
+	exit(1);
4ff3f0
+}
4ff3f0
+
4ff3f0
 int main(int argc, char **argv) 
4ff3f0
 {
4ff3f0
 	char *buf;
4ff3f0
 	int rc, i;
4ff3f0
+	int header=1, opt;
4ff3f0
 
4ff3f0
-	if (argc < 2) {
4ff3f0
-		fprintf(stderr, "usage:  %s path...\n", argv[0]);
4ff3f0
-		return 1;
4ff3f0
-	}
4ff3f0
+	if (argc < 2) usage(argv[0]);
4ff3f0
 
4ff3f0
-	for (i = 1; i < argc; i++) {
4ff3f0
+	while ((opt = getopt(argc, argv, "n")) > 0) {
4ff3f0
+		switch (opt) {
4ff3f0
+		case 'n':
4ff3f0
+			header=0;
4ff3f0
+			break;
4ff3f0
+		default:
4ff3f0
+			usage(argv[0]);
4ff3f0
+		}
4ff3f0
+	}
4ff3f0
+	for (i = optind; i < argc; i++) {
4ff3f0
 		rc = matchpathcon(argv[i], 0, &buf);
4ff3f0
 		if (rc < 0) {
4ff3f0
 			fprintf(stderr, "%s:  matchpathcon(%s) failed\n", argv[0], argv[i]);
4ff3f0
 			return 2;
4ff3f0
 		}
4ff3f0
-		printf("%s\t%s\n", argv[i], buf);
4ff3f0
+		if (header)
4ff3f0
+			printf("%s\t%s\n", argv[i], buf);
4ff3f0
+		else
4ff3f0
+			printf("%s\n", buf);
4ff3f0
+
4ff3f0
 		freecon(buf);
4ff3f0
 	}
4ff3f0
 	return 0;