2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Fix logic bug when matching syslog priority and facility.

This commit is contained in:
Todd C. Miller
2016-12-20 10:24:55 -07:00
parent 87d02bfe2d
commit 0d9255b2f7

View File

@@ -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);
}