checkpolicy: bail out on invalid role

Return early on invalid roles in user definition.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
Christian Göttsche 2024-01-22 14:55:00 +01:00 committed by James Carter
parent 52f187cb5d
commit 8ad3ce721e
1 changed files with 1 additions and 1 deletions

View File

@ -4244,7 +4244,7 @@ int define_user(void)
while ((id = queue_remove(id_queue))) { while ((id = queue_remove(id_queue))) {
if (set_user_roles(&usrdatum->roles, id)) if (set_user_roles(&usrdatum->roles, id))
continue; return -1;
} }
if (mlspol) { if (mlspol) {