Blame SOURCES/autofs-5.1.3-fix-nisplus-lookup-init-not-configured-check.patch

cef8f8
autofs-5.1.3 - fix nisplus lookup init not configured check
cef8f8
cef8f8
From: Ian Kent <raven@themaw.net>
cef8f8
cef8f8
If nisplus is not configured nis_local_directory() can return the domain
cef8f8
name "(none).".
cef8f8
cef8f8
Signed-off-by: Ian Kent <raven@themaw.net>
cef8f8
---
cef8f8
 CHANGELOG                |    1 +
cef8f8
 modules/lookup_nisplus.c |    2 +-
cef8f8
 2 files changed, 2 insertions(+), 1 deletion(-)
cef8f8
cef8f8
--- autofs-5.0.7.orig/CHANGELOG
cef8f8
+++ autofs-5.0.7/CHANGELOG
cef8f8
@@ -258,6 +258,7 @@
cef8f8
 - allow dot in OPTIONSTR value lexer pattern.
cef8f8
 - revert fix argc off by one in mount_autofs.c.
cef8f8
 - only take master map mutex for master map update.
cef8f8
+- fix nisplus lookup init not configured check.
cef8f8
 
cef8f8
 25/07/2012 autofs-5.0.7
cef8f8
 =======================
cef8f8
--- autofs-5.0.7.orig/modules/lookup_nisplus.c
cef8f8
+++ autofs-5.0.7/modules/lookup_nisplus.c
cef8f8
@@ -48,7 +48,7 @@ static int do_init(const char *mapfmt,
cef8f8
 	 * We don't need to copy or free it.
cef8f8
 	 */
cef8f8
 	ctxt->domainname = nis_local_directory();
cef8f8
-	if (!ctxt->domainname) {
cef8f8
+	if (!ctxt->domainname || !strcmp(ctxt->domainname, "(none).")) {
cef8f8
 		logmsg(MODPREFIX "NIS+ domain not set");
cef8f8
 		ret = 1;
cef8f8
 		goto out;