diff --git a/policycoreutils/semodule/semodule.8 b/policycoreutils/semodule/semodule.8 index c4a090c4..afcb2c8d 100644 --- a/policycoreutils/semodule/semodule.8 +++ b/policycoreutils/semodule/semodule.8 @@ -70,6 +70,9 @@ prints help message and quit .B \-P,\-\-preserve_tunables Preserve tunables in policy .TP +.B \-p,\-\-path +Use an alternate path for the policy root +.TP .B \-v,\-\-verbose be verbose @@ -95,6 +98,8 @@ $ semodule \-d alsa $ semodule \-X 100 \-i alsa.pp # List all modules. $ semodule \-l full +# Set an alternate path for the policy root +$ semodule \-B \-p "/tmp" .fi .SH SEE ALSO diff --git a/policycoreutils/semodule/semodule.c b/policycoreutils/semodule/semodule.c index 957f54fa..6b13ce1b 100644 --- a/policycoreutils/semodule/semodule.c +++ b/policycoreutils/semodule/semodule.c @@ -172,6 +172,7 @@ static void parse_command_line(int argc, char **argv) {"priority", required_argument, NULL, 'X'}, {"enable", required_argument, NULL, 'e'}, {"disable", required_argument, NULL, 'd'}, + {"path", required_argument, NULL, 'p'}, {NULL, 0, NULL, 0} }; int i; @@ -181,7 +182,7 @@ static void parse_command_line(int argc, char **argv) create_store = 0; priority = 400; while ((i = - getopt_long(argc, argv, "s:b:hi:l::vqr:u:RnNBDPX:e:d:", opts, + getopt_long(argc, argv, "s:b:hi:l::vqr:u:RnNBDPX:e:d:p:", opts, NULL)) != -1) { switch (i) { case 'b': @@ -209,6 +210,9 @@ static void parse_command_line(int argc, char **argv) case 's': set_store(optarg); break; + case 'p': + semanage_set_root(optarg); + break; case 'R': reload = 1; break;