diff --git a/CHANGELOG b/CHANGELOG index bd18e98..a0cd729 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ - fixed numeric export match. - add option to select replicated server at random (instead of response time). - fix incorrect cast in directory cleanup routines. +- fix directory creation for browse mounts. 20/2/2007 autofs-5.0.1 ---------------------- 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);