Skip to content

Commit 286c8dd

Browse files
committed
Disable netgroup_query when netgroup_base is not set.
The logic was inverted when support for netgroup_query was added. This supercedes PR #341. --HG-- branch : 1.9
1 parent 0e8b722 commit 286c8dd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

plugins/sudoers/ldap_conf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,10 @@ sudo_ldap_read_config(const struct sudoers_context *ctx)
599599
debug_return_bool(false);
600600
}
601601
}
602-
if (!STAILQ_EMPTY(&ldap_conf.netgroup_base))
602+
if (STAILQ_EMPTY(&ldap_conf.netgroup_base)) {
603+
/* netgroup_query is only valid in conjunction with netgroup_base */
603604
ldap_conf.netgroup_query = false;
605+
}
604606

605607
DPRINTF1("LDAP Config Summary");
606608
DPRINTF1("===================");

0 commit comments

Comments
 (0)