policycoreutils: semodule: add back support for alternative root paths

Removed in commits:
- Revert "policycoreutils: semodule: support for alternative root paths"

Signed-off-by: Steve Lawrence <slawrence@tresys.com>
This commit is contained in:
Steve Lawrence 2011-11-22 13:42:48 -05:00
parent c35678eb6d
commit 6e085368f1
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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;