- fix directory creation for browse mounts.

- fix wildcard map handling and improve nsswitch source map update.
This commit is contained in:
ikent 2007-03-29 07:31:59 +00:00
parent 8eb076db23
commit f5c86b60af
3 changed files with 1567 additions and 1 deletions

View File

@ -0,0 +1,52 @@
diff --git a/daemon/lookup.c b/daemon/lookup.c
index aded82b..4429edb 100644
--- a/daemon/lookup.c
+++ b/daemon/lookup.c
@@ -423,6 +423,7 @@ int lookup_nss_read_map(struct autofs_point *ap, time_t age)
struct nss_source *this;
struct map_source *map;
enum nsswitch_status status;
+ unsigned int at_least_one = 0;
int result = 0;
/*
@@ -493,9 +494,13 @@ int lookup_nss_read_map(struct autofs_point *ap, time_t age)
if (result == NSS_STATUS_UNKNOWN)
continue;
+ if (result == NSS_STATUS_SUCCESS) {
+ at_least_one = 1;
+ result = NSS_STATUS_TRYAGAIN;
+ }
+
status = check_nss_result(this, result);
if (status >= 0) {
- result = !status;
map = NULL;
break;
}
@@ -509,7 +514,10 @@ int lookup_nss_read_map(struct autofs_point *ap, time_t age)
}
pthread_cleanup_pop(1);
- return !result;
+ if (!result || at_least_one)
+ return 1;
+
+ return 0;
}
int lookup_ghost(struct autofs_point *ap)
diff --git a/modules/lookup_yp.c b/modules/lookup_yp.c
index bc75be0..5f03b2f 100644
--- a/modules/lookup_yp.c
+++ b/modules/lookup_yp.c
@@ -305,7 +305,7 @@ int lookup_read_map(struct autofs_point *ap, time_t age, void *context)
mapname = alloca(strlen(ctxt->mapname) + 1);
if (!mapname)
- return 0;
+ return NSS_STATUS_UNKNOWN;
strcpy(mapname, ctxt->mapname);

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.1
Release: 5
Release: 6
Epoch: 1
License: GPL
Group: System Environment/Daemons
@ -19,6 +19,8 @@ Patch6: autofs-5.0.1-network_match-fix.patch
Patch7: autofs-5.0.1-drop-default-prefix-from-config.patch
Patch8: autofs-5.0.1-random-selection.patch
Patch9: autofs-5.0.1-bad-cast.patch
Patch10: autofs-5.0.1-fix-browse-dir-create.patch
Patch11: autofs-5.0.1-map-update-source-only.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
Conflicts: kernel < 2.6.17
@ -69,6 +71,8 @@ echo %{version}-%{release} > .version
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@ -121,6 +125,10 @@ fi
%{_libdir}/autofs/
%changelog
* Fri Mar 29 2007 Ian Kent <ikent@redhat.com> - 5.0.1-6
- fix directory creation for browse mounts.
- fix wildcard map handling and improve nsswitch source map update.
* Fri Mar 16 2007 Ian Kent <ikent@redhat.com> - 5.0.1-5
- drop "DEFAULT_" prefix from configuration names.
- add option to select replicated server at random (instead of