Ian Kent 239613
autofs-5.0.3 - fix incorrect if check in get user info
Ian Kent 239613
Ian Kent 239613
From: Ian Kent <raven@themaw.net>
Ian Kent 239613
Ian Kent 239613
Fix an if statement checking the wrong value in the get user info code.
Ian Kent 239613
---
Ian Kent 239613
Ian Kent 239613
 daemon/direct.c   |    2 +-
Ian Kent 239613
 daemon/indirect.c |    2 +-
Ian Kent 239613
 2 files changed, 2 insertions(+), 2 deletions(-)
Ian Kent 239613
Ian Kent 239613
Ian Kent 239613
diff --git a/daemon/direct.c b/daemon/direct.c
Ian Kent 239613
index 98590ec..072ef97 100644
Ian Kent 239613
--- a/daemon/direct.c
Ian Kent 239613
+++ b/daemon/direct.c
Ian Kent 239613
@@ -1337,7 +1337,7 @@ static void *do_mount_direct(void *arg)
Ian Kent 239613
 	}
Ian Kent 239613
 
Ian Kent 239613
 	tsv->home = strdup(pw.pw_dir);
Ian Kent 239613
-	if (!tsv->user) {
Ian Kent 239613
+	if (!tsv->home) {
Ian Kent 239613
 		error(ap->logopt, "failed to malloc buffer for home");
Ian Kent 239613
 		free(pw_tmp);
Ian Kent 239613
 		free(tsv->user);
Ian Kent 239613
diff --git a/daemon/indirect.c b/daemon/indirect.c
Ian Kent 239613
index 9f22ec9..ccdd8bf 100644
Ian Kent 239613
--- a/daemon/indirect.c
Ian Kent 239613
+++ b/daemon/indirect.c
Ian Kent 239613
@@ -768,7 +768,7 @@ static void *do_mount_indirect(void *arg)
Ian Kent 239613
 	}
Ian Kent 239613
 
Ian Kent 239613
 	tsv->home = strdup(pw.pw_dir);
Ian Kent 239613
-	if (!tsv->user) {
Ian Kent 239613
+	if (!tsv->home) {
Ian Kent 239613
 		error(ap->logopt, "failed to malloc buffer for home");
Ian Kent 239613
 		free(pw_tmp);
Ian Kent 239613
 		free(tsv->user);