mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-09 14:17:31 +00:00
policycoreutils: semodule: support for alternative root paths
Add a -p option to semodule which will allow it to operate on the specified semanaged root instead of the default. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
4b00b5c6a4
commit
5e096d9ceb
@ -162,6 +162,7 @@ static void parse_command_line(int argc, char **argv)
|
|||||||
{"noreload", 0, NULL, 'n'},
|
{"noreload", 0, NULL, 'n'},
|
||||||
{"build", 0, NULL, 'B'},
|
{"build", 0, NULL, 'B'},
|
||||||
{"disable_dontaudit", 0, NULL, 'D'},
|
{"disable_dontaudit", 0, NULL, 'D'},
|
||||||
|
{"path", required_argument, NULL, 'p'},
|
||||||
{NULL, 0, NULL, 0}
|
{NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
int i;
|
int i;
|
||||||
@ -170,7 +171,7 @@ static void parse_command_line(int argc, char **argv)
|
|||||||
no_reload = 0;
|
no_reload = 0;
|
||||||
create_store = 0;
|
create_store = 0;
|
||||||
while ((i =
|
while ((i =
|
||||||
getopt_long(argc, argv, "s:b:hi:lvqe:d:r:u:RnBD", opts,
|
getopt_long(argc, argv, "p:s:b:hi:lvqe:d:r:u:RnBD", opts,
|
||||||
NULL)) != -1) {
|
NULL)) != -1) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 'b':
|
case 'b':
|
||||||
@ -198,6 +199,9 @@ static void parse_command_line(int argc, char **argv)
|
|||||||
case 'r':
|
case 'r':
|
||||||
set_mode(REMOVE_M, optarg);
|
set_mode(REMOVE_M, optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
semanage_set_root(optarg);
|
||||||
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
set_mode(UPGRADE_M, optarg);
|
set_mode(UPGRADE_M, optarg);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user