1 diff --git a/CHANGELOG b/CHANGELOG
2 index a2a782d..9a2a8c1 100644
6 - fix LDAP schema discovery.
7 - add SEARCH_BASE configuration option.
8 - work around segv at exit due to libxml2 tsd usage.
9 +- re-read config on HUP signal.
11 18/06/2007 autofs-5.0.2
12 -----------------------
13 diff --git a/daemon/automount.c b/daemon/automount.c
14 index e9cae4e..3d6a703 100644
15 --- a/daemon/automount.c
16 +++ b/daemon/automount.c
17 @@ -986,6 +986,8 @@ static void *do_read_master(void *arg)
21 + defaults_read_config();
23 status = master_read_master(master, age, readall);
26 diff --git a/lib/master.c b/lib/master.c
27 index da05bb6..637ce04 100644
30 @@ -1169,6 +1169,10 @@ int master_mount_mounts(struct master *master, time_t age, int readall)
34 + master_source_writelock(this);
35 + lookup_close_lookup(ap);
36 + master_source_unlock(this);
39 ne = cache_lookup_distinct(nc, this->path);
40 if (ne && this->age > ne->age) {
41 diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c
42 index 8821f84..9aac792 100644
43 --- a/modules/cyrus-sasl.c
44 +++ b/modules/cyrus-sasl.c
45 @@ -528,6 +528,7 @@ sasl_do_kinit(struct lookup_context *ctxt)
50 krb5_free_unparsed_name(ctxt->krb5ctxt, tgs_name);
52 status = pthread_mutex_lock(&krb5cc_mutex);
53 diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
54 index 49a9a9b..2baf8b8 100644
55 --- a/modules/lookup_ldap.c
56 +++ b/modules/lookup_ldap.c
57 @@ -174,7 +174,7 @@ LDAP *init_ldap_connection(struct lookup_context *ctxt)
58 static int get_query_dn(LDAP *ldap, struct lookup_context *ctxt, const char *class, const char *key)
60 char buf[PARSE_MAX_BUF];
62 + char *query, *dn, *qdn;
63 LDAPMessage *result = NULL, *e;
64 struct ldap_searchdn *sdns = NULL;
66 @@ -225,15 +225,18 @@ static int get_query_dn(LDAP *ldap, struct lookup_context *ctxt, const char *cla
69 sdns = defaults_get_searchdns();
73 + defaults_free_searchdns(ctxt->sdns);
80 rv = ldap_search_s(ldap, ctxt->base,
81 scope, query, attrs, 0, &result);
83 - struct ldap_searchdn *this = sdns;
84 + struct ldap_searchdn *this = ctxt->sdns;
86 debug(LOGOPT_NONE, MODPREFIX
87 "check search base list");
88 @@ -269,7 +272,6 @@ static int get_query_dn(LDAP *ldap, struct lookup_context *ctxt, const char *cla
90 dn = ldap_get_dn(ldap, e);
91 debug(LOGOPT_NONE, MODPREFIX "query dn %s", dn);
92 - ldap_msgfree(result);
95 MODPREFIX "query succeeded, no matches for %s",
96 @@ -278,7 +280,16 @@ static int get_query_dn(LDAP *ldap, struct lookup_context *ctxt, const char *cla
103 + ldap_msgfree(result);
114 @@ -1018,7 +1029,7 @@ static void free_context(struct lookup_context *ctxt)
118 - ldap_memfree(ctxt->qdn);
123 @@ -1600,14 +1611,14 @@ static int lookup_one(struct autofs_point *ap,
128 - MODPREFIX "searching for \"%s\" under \"%s\"", query, ctxt->qdn);
130 /* Initialize the LDAP context. */
131 ldap = do_connect(ctxt);
136 + MODPREFIX "searching for \"%s\" under \"%s\"", query, ctxt->qdn);
138 rv = ldap_search_s(ldap, ctxt->qdn, scope, query, attrs, 0, &result);
140 if ((rv != LDAP_SUCCESS) || !result) {