diff --git a/policycoreutils/restorecond/restorecond.8 b/policycoreutils/restorecond/restorecond.8 index 4622d2b1..bf8ec875 100644 --- a/policycoreutils/restorecond/restorecond.8 +++ b/policycoreutils/restorecond/restorecond.8 @@ -3,7 +3,7 @@ restorecond \- daemon that watches for file creation and then sets the default SELinux file context .SH "SYNOPSIS" -.B restorecond [\-d] [\-f restorecond_file ] [\-u] [\-v] +.B restorecond [\-d] [-h] [\-f restorecond_file ] [\-u] [\-v] .P .SH "DESCRIPTION" @@ -20,6 +20,9 @@ the correct file context associated with the policy. Turns on debugging mode. Application will stay in the foreground and lots of debugs messages start printing. .TP +. B \-h +Print usage statement. +.TP .B \-f restorecond_file Use alternative restorecond.conf file. .TP diff --git a/policycoreutils/restorecond/restorecond.c b/policycoreutils/restorecond/restorecond.c index 93994fc3..9bdd89d2 100644 --- a/policycoreutils/restorecond/restorecond.c +++ b/policycoreutils/restorecond/restorecond.c @@ -175,7 +175,7 @@ int main(int argc, char **argv) exclude_non_seclabel_mounts(); atexit( done ); - while ((opt = getopt(argc, argv, "df:uv")) > 0) { + while ((opt = getopt(argc, argv, "hdf:uv")) > 0) { switch (opt) { case 'd': debug_mode = 1; @@ -186,6 +186,10 @@ int main(int argc, char **argv) case 'u': run_as_user = 1; break; + case 'h': + usage(argv[0]); + exit(0); + break; case 'v': r_opts.verbose++; break;