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

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