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

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