]>
Commit | Line | Data |
---|---|---|
3d551623 PG |
1 | diff --git a/CHANGELOG b/CHANGELOG |
2 | index ef549cf..08afa7c 100644 | |
3 | --- a/CHANGELOG | |
4 | +++ b/CHANGELOG | |
5 | @@ -23,6 +23,7 @@ | |
6 | - add random selection as a master map entry option. | |
7 | - fix couple of edge case parse fails of timeout option. | |
8 | - check for "*" when looking up wildcard in LDAP. | |
9 | +- fix LDAP schema discovery. | |
10 | ||
11 | 18/06/2007 autofs-5.0.2 | |
12 | ----------------------- | |
13 | diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c | |
14 | index a7b315e..9c18ca1 100644 | |
15 | --- a/modules/lookup_ldap.c | |
16 | +++ b/modules/lookup_ldap.c | |
17 | @@ -1009,6 +1009,15 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co | |
18 | free_context(ctxt); | |
19 | return 1; | |
20 | } | |
21 | + } else { | |
22 | + const char *class = ctxt->schema->map_class; | |
23 | + const char *key = ctxt->schema->map_attr; | |
24 | + if (!get_query_dn(ldap, ctxt, class, key)) { | |
25 | + unbind_ldap_connection(ldap, ctxt); | |
26 | + error(LOGOPT_ANY, MODPREFIX "failed to get query dn"); | |
27 | + free_context(ctxt); | |
28 | + return 1; | |
29 | + } | |
30 | } | |
31 | unbind_ldap_connection(ldap, ctxt); | |
32 |