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