mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Fix logic bug when matching syslog priority and facility.
This commit is contained in:
@@ -912,7 +912,7 @@ store_syslogfac(const char *str, union sudo_defs_val *sd_un)
|
||||
debug_return_bool(true);
|
||||
}
|
||||
for (fac = facilities; fac->name != NULL; fac++) {
|
||||
if (strcmp(str, fac->name) != 0) {
|
||||
if (strcmp(str, fac->name) == 0) {
|
||||
sd_un->ival = fac->num;
|
||||
debug_return_bool(true);
|
||||
}
|
||||
@@ -942,7 +942,7 @@ store_syslogpri(const char *str, union sudo_defs_val *sd_un)
|
||||
debug_return_bool(true);
|
||||
}
|
||||
for (pri = priorities; pri->name != NULL; pri++) {
|
||||
if (strcmp(str, pri->name) != 0) {
|
||||
if (strcmp(str, pri->name) == 0) {
|
||||
sd_un->ival = pri->num;
|
||||
debug_return_bool(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user