Skip to content

Commit 00c6075

Browse files
committed
sudo_sss_check_user: Fix evaluation of negative entries in sudoUser
When support was added for negated entries in a sudoUser, the loop invariant was not modified to continue checking event after a positive match was found.
1 parent 8443ab4 commit 00c6075

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/sudoers/sssd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* SPDX-License-Identifier: ISC
33
*
4-
* Copyright (c) 2003-2022 Todd C. Miller <[email protected]>
4+
* Copyright (c) 2003-2023, 2026 Todd C. Miller <[email protected]>
55
* Copyright (c) 2011 Daniel Kopecek <[email protected]>
66
*
77
* This code is derived from software contributed by Aaron Spangler.
@@ -187,7 +187,7 @@ sudo_sss_check_user(struct sudoers_context *ctx, struct sudo_sss_handle *handle,
187187
}
188188

189189
/* Walk through sudoUser values. */
190-
for (i = 0; val_array[i] != NULL && !ret; ++i) {
190+
for (i = 0; val_array[i] != NULL; ++i) {
191191
const char *val = val_array[i];
192192
bool negated = false;
193193

0 commit comments

Comments
 (0)