Ian Kent eb1a40
diff --git a/CHANGELOG b/CHANGELOG
Ian Kent eb1a40
index e393f33..033923d 100644
Ian Kent eb1a40
--- a/CHANGELOG
Ian Kent eb1a40
+++ b/CHANGELOG
Ian Kent eb1a40
@@ -5,6 +5,7 @@
Ian Kent eb1a40
 - correction for handling of LDAP base dns with spaces.
Ian Kent eb1a40
 - avoid using UDP for probing NFSv4 mount requests.
Ian Kent eb1a40
 - use libldap instead of libldap_r (Guillaume Rousse).
Ian Kent eb1a40
+- another fix for don't fail on empty master map.
Ian Kent eb1a40
  
Ian Kent eb1a40
 14/01/2008 autofs-5.0.3
Ian Kent eb1a40
 -----------------------
Ian Kent eb1a40
diff --git a/lib/master.c b/lib/master.c
Ian Kent eb1a40
index ed82131..4a34dd4 100644
Ian Kent eb1a40
--- a/lib/master.c
Ian Kent eb1a40
+++ b/lib/master.c
Ian Kent eb1a40
@@ -799,21 +799,13 @@ int master_read_master(struct master *master, time_t age, int readall)
Ian Kent eb1a40
 
Ian Kent eb1a40
 	master_init_scan();
Ian Kent eb1a40
 
Ian Kent eb1a40
-	if (!lookup_nss_read_master(master, age)) {
Ian Kent eb1a40
-		error(logopt,
Ian Kent eb1a40
-		      "can't read master map %s", master->name);
Ian Kent eb1a40
-		return 0;
Ian Kent eb1a40
-	}
Ian Kent eb1a40
-
Ian Kent eb1a40
+	lookup_nss_read_master(master, age);
Ian Kent eb1a40
 	master_mount_mounts(master, age, readall);
Ian Kent eb1a40
 
Ian Kent eb1a40
 	master_mutex_lock();
Ian Kent eb1a40
 
Ian Kent eb1a40
-	if (list_empty(&master->mounts)) {
Ian Kent eb1a40
-		master_mutex_unlock();
Ian Kent eb1a40
+	if (list_empty(&master->mounts))
Ian Kent eb1a40
 		warn(logopt, "no mounts in table");
Ian Kent eb1a40
-		return 1;
Ian Kent eb1a40
-	}
Ian Kent eb1a40
 
Ian Kent eb1a40
 	master_mutex_unlock();
Ian Kent eb1a40
 
Ian Kent eb1a40
diff --git a/modules/lookup_file.c b/modules/lookup_file.c
Ian Kent eb1a40
index b01eea6..466690a 100644
Ian Kent eb1a40
--- a/modules/lookup_file.c
Ian Kent eb1a40
+++ b/modules/lookup_file.c
Ian Kent eb1a40
@@ -475,6 +475,7 @@ int lookup_read_master(struct master *master, time_t age, void *context)
Ian Kent eb1a40
 				     "failed to read included master map %s",
Ian Kent eb1a40
 				     master->name);
Ian Kent eb1a40
 				if (!master->recurse) {
Ian Kent eb1a40
+					master->name = save_name;
Ian Kent eb1a40
 					master->depth--;
Ian Kent eb1a40
 					master->recurse = 0;
Ian Kent eb1a40
 					fclose(f);