Skip to contentSkip to conversation

: document the "-f" option in the setfiles' manual page

PATCH New Guido Trentalancia 1 participant 1 message Jul 22, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : document the "-f" option in the setfiles' manual page

Document the -f option (take a list of files to be processed from an input file instead of a list of paths from the command-line) in the setfiles' manual page.

Minor cosmetic improvements to the same manual page and to the setfiles' usage message.

Whitespace/tab conversion at the end of the setfiles source.

---
 policycoreutils/setfiles/setfiles.8 |   12 +++++++++---
 policycoreutils/setfiles/setfiles.c |   12 +++++++-----
 2 files changed, 16 insertions(+), 8 deletions(-)
policycoreutils/setfiles/setfiles.8 +9 -3
diff -pruN selinux-20072012/policycoreutils/setfiles/setfiles.8 selinux-20072012-setfiles-man-page-input-file/policycoreutils/setfiles/setfiles.8
@@ -12,11 +12,12 @@ program.
 .P
 This program is primarily used to initialize the security context
 database (extended attributes) on one or more filesystems.  This
-program is initially run as part of the SE Linux installation process.
+program is initially run as part of the SELinux installation process.
 .P
 It can also be run at any time to correct errors, to add support for
 new policy, or with the \-n option it can just check whether the file
-contexts are all as you expect.
+contexts are all initialized as specified in the active policy's file
+contexts specification.
 
 .SH "OPTIONS"
 .TP 
@@ -49,10 +50,13 @@ Force reset of context to match file_con
 .TP 
 .B \-o filename
 save list of files with incorrect context in filename.
+.TP
+.B \-f
+take a list of files to be processed from an input file.
 .TP 
 .B \-s
 take a list of files from standard input instead of using a pathname on the
-command line.
+command line (equivalent to \-f \-).
 .TP
 .B \-v
 show changes in file labels, if type or role are changing.
@@ -90,6 +94,8 @@ specification other than <<none>>.
 The pathname for the root directory of each file system to be relabeled. 
 Not used if the
 .B \-s
+or the
+.B \-f
 option is used.
 
 .SH "AUTHOR"
policycoreutils/setfiles/setfiles.c +9 -7
diff -pruN selinux-20072012/policycoreutils/setfiles/setfiles.c selinux-20072012-setfiles-man-page-input-file/policycoreutils/setfiles/setfiles.c
@@ -39,14 +39,16 @@ void usage(const char *const name)
 {
 	if (iamrestorecon) {
 		fprintf(stderr,
-			"usage:  %s [-iFnprRv0] [-e excludedir ] [-o filename ] [-f filename | pathname... ]\n",
-			name);
+			"usage:  %s [-iFnprRv0] [-e excludedir] [-o filename] pathname...\n"
+			"usage:  %s [-iFnprRv0] [-e excludedir] [-o filename] -f filename\n",
+			name, name);
 	} else {
 		fprintf(stderr,
-			"usage:  %s [-dnpqvW] [-o filename] [-r alt_root_path ] spec_file pathname...\n"
+			"usage:  %s [-dnpqvW] [-o filename] [-r alt_root_path] spec_file pathname...\n"
+			"usage:  %s [-dnpqvW] [-o filename] [-r alt_root_path] spec_file -f filename\n"
 			"usage:  %s -c policyfile spec_file\n"
-			"usage:  %s -s [-dnpqvW] [-o filename ] spec_file\n", name, name,
-			name);
+			"usage:  %s -s [-dnpqvW] [-o filename] spec_file\n",
+			name, name, name, name);
 	}
 	exit(1);
 }
@@ -433,7 +435,7 @@ int main(int argc, char **argv)
 	if (r_opts.outfile)
 		fclose(r_opts.outfile);
 
-       if (r_opts.progress && r_opts.count >= STAR_COUNT)
-               printf("\n");
+	if (r_opts.progress && r_opts.count >= STAR_COUNT)
+		printf("\n");
 	exit(errors);
 }

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.