PR-4581099.ftpd.c.patch   [plain text]


--- src/ftpd.c.orig	2007-01-10 14:00:35.000000000 -0800
+++ src/ftpd.c	2007-01-10 14:24:26.000000000 -0800
@@ -1667,6 +1667,9 @@
 			goto bad;
 		}
 	}
+#ifdef __APPLE__
+	setenv("HOME", homedir, 1);
+#else
 	{		/* XXX: replaces use of setenv() */
 		char	*p;
 		int	 len;
@@ -1680,6 +1683,7 @@
 		putenv(p);
 		free(p);
 	}
+#endif /* __APPLE__ */
 
 	if (curclass.type == CLASS_GUEST && passwd[0] == '-')
 		quietmessages = 1;