mirror of
https://github.com/topjohnwu/selinux.git
synced 2025-01-31 08:24:09 +00:00
libsemanage: do boolean name substitution
So people can use -P and it will work. Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
parent
ee6901618c
commit
b0b22829eb
@ -19,6 +19,8 @@ typedef semanage_bool_key_t record_key_t;
|
||||
#include "boolean_internal.h"
|
||||
#include "handle.h"
|
||||
#include "database.h"
|
||||
#include <stdlib.h>
|
||||
#include <selinux/selinux.h>
|
||||
|
||||
/* Key */
|
||||
int semanage_bool_key_create(semanage_handle_t * handle,
|
||||
@ -82,8 +84,11 @@ hidden_def(semanage_bool_get_name)
|
||||
int semanage_bool_set_name(semanage_handle_t * handle,
|
||||
semanage_bool_t * boolean, const char *name)
|
||||
{
|
||||
|
||||
return sepol_bool_set_name(handle->sepolh, boolean, name);
|
||||
int rc;
|
||||
char *subname = selinux_boolean_sub(name);
|
||||
rc = sepol_bool_set_name(handle->sepolh, boolean, subname);
|
||||
free(subname);
|
||||
return rc;
|
||||
}
|
||||
|
||||
hidden_def(semanage_bool_set_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user