- another fix for don't fail on empty master map.

This commit is contained in:
Ian Kent 2008-02-01 07:12:55 +00:00
parent 5a1604c521
commit eb1a40f905
2 changed files with 58 additions and 1 deletions

View File

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

View File

@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.3
Release: 4
Release: 5
Epoch: 1
License: GPL
Group: System Environment/Daemons
@ -15,6 +15,7 @@ Patch2: autofs-5.0.3-xfn-not-supported.patch
Patch3: autofs-5.0.3-basedn-with-spaces-fix-3.patch
Patch4: autofs-5.0.3-nfs4-tcp-only.patch
Patch5: autofs-5.0.3-correct-ldap-lib.patch
Patch6: autofs-5.0.3-dont-fail-on-empty-master-fix-2.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs
Conflicts: kernel < 2.6.17
@ -61,6 +62,7 @@ echo %{version}-%{release} > .version
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@ -113,6 +115,9 @@ fi
%{_libdir}/autofs/
%changelog
* Fri Feb 1 2008 Ian Kent <ikent@redhat.com> - 5.0.3-5
- another fix for don't fail on empty master map.
* Fri Jan 25 2008 Ian Kent <ikent@redhat.com> - 5.0.3-4
- correction to the correction for handling of LDAP base dns with spaces.
- avoid using UDP for probing NFSv4 mount requests.