mirror of
https://github.com/SELinuxProject/selinux
synced 2025-03-08 11:17:28 +00:00
libsepol: do not modify p->p_roles.nprim in role_set_expand
There is no reason to modify the number of roles defined in a policy when no role is being inserted. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
2907caa33c
commit
86bad3dbf9
@ -2424,7 +2424,7 @@ int role_set_expand(role_set_t * x, ebitmap_t * r, policydb_t * out, policydb_t
|
|||||||
ebitmap_init(r);
|
ebitmap_init(r);
|
||||||
|
|
||||||
if (x->flags & ROLE_STAR) {
|
if (x->flags & ROLE_STAR) {
|
||||||
for (i = 0; i < p->p_roles.nprim++; i++)
|
for (i = 0; i < p->p_roles.nprim; i++)
|
||||||
if (ebitmap_set_bit(r, i, 1))
|
if (ebitmap_set_bit(r, i, 1))
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user