Disable netgroup_query when netgroup_base is not set.

The logic was inverted when support for netgroup_query was added.
This supercedes PR #341.
This commit is contained in:
Todd C. Miller
2023-12-19 20:16:35 -07:00
parent 6d4ffe6743
commit 5fbf7a3625

View File

@@ -599,8 +599,10 @@ sudo_ldap_read_config(const struct sudoers_context *ctx)
debug_return_bool(false);
}
}
if (!STAILQ_EMPTY(&ldap_conf.netgroup_base))
if (STAILQ_EMPTY(&ldap_conf.netgroup_base)) {
/* netgroup_query is only valid in conjunction with netgroup_base */
ldap_conf.netgroup_query = false;
}
DPRINTF1("LDAP Config Summary");
DPRINTF1("===================");