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

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