1 diff --git a/CHANGELOG b/CHANGELOG
2 index 795ec30..1c147c5 100644
6 - add map re-load to verbose logging.
7 - fix handling of LDAP base dns with spaces.
8 - handle MTAB_NOTUPDATED status return from mount.
9 +- when default master map, auto.master, is used also check for auto_master.
11 18/06/2007 autofs-5.0.2
12 -----------------------
13 diff --git a/daemon/lookup.c b/daemon/lookup.c
14 index fd99cf2..0be10d3 100644
17 @@ -222,6 +222,28 @@ int lookup_nss_read_master(struct master *master, time_t age)
18 "reading master %s %s", this->source, master->name);
20 result = read_master_map(master, this->source, age);
23 + * If the name of the master map hasn't been explicitly
24 + * configured and we're not reading an included master map
25 + * then we're using auto.master as the default. Many setups
26 + * also use auto_master as the default master map so we
27 + * check for this map when auto.master isn't found.
29 + if (result != NSS_STATUS_SUCCESS &&
30 + !master->depth && !defaults_master_set()) {
31 + char *tmp = strchr(master->name, '.');
34 + "%s not found, replacing '.' with '_'",
37 + result = read_master_map(master, this->source, age);
38 + if (result != NSS_STATUS_SUCCESS)
43 if (result == NSS_STATUS_UNKNOWN) {
44 debug(logopt, "no map - continuing to next source");
46 diff --git a/include/defaults.h b/include/defaults.h
47 index 0e0e2a5..e296478 100644
48 --- a/include/defaults.h
49 +++ b/include/defaults.h
50 @@ -43,6 +43,7 @@ struct ldap_searchdn;
52 unsigned int defaults_read_config(unsigned int);
53 const char *defaults_get_master_map(void);
54 +int defaults_master_set(void);
55 unsigned int defaults_get_timeout(void);
56 unsigned int defaults_get_browse_mode(void);
57 unsigned int defaults_get_logging(void);
58 diff --git a/lib/defaults.c b/lib/defaults.c
59 index 94885e8..f494103 100644
62 @@ -350,6 +350,15 @@ const char *defaults_get_master_map(void)
63 return (const char *) master;
66 +int defaults_master_set(void)
68 + char *val = getenv(ENV_NAME_MASTER_MAP);
75 unsigned int defaults_get_timeout(void)