mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
confd: fix check for group membership
Checking if a user is an administratr we cannot rely solely on the return value of sr_get_items() but also ensure at least one group matches the search criteria. Fixes #469 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
2218901dc7
commit
50e068ef10
@@ -1180,7 +1180,8 @@ static int change_nacm(sr_session_ctx_t *session, uint32_t sub_id, const char *m
|
||||
continue; /* not found, this is OK */
|
||||
|
||||
/* At least one group grants full administrator permissions */
|
||||
is_admin = true;
|
||||
if (rule_count > 0)
|
||||
is_admin = true;
|
||||
|
||||
sr_free_values(rules, rule_count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user