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


--- tnftpd-20091122/src/ftpd.c	2009-11-06 19:26:21.000000000 -0800
+++ tnftpd/src/ftpd.c	2010-01-28 17:03:18.000000000 -0800
@@ -1738,6 +1738,9 @@
 			goto bad;
 		}
 	}
+#ifdef __APPLE__
+	setenv("HOME", homedir, 1);
+#else
 	{		/* XXX: replaces use of setenv() */
 		char	*p;
 		int	 len;
@@ -1751,6 +1754,7 @@
 		putenv(p);
 		free(p);
 	}
+#endif /* __APPLE__ */
 
 	if (curclass.type == CLASS_GUEST && passwd[0] == '-')
 		quietmessages = 1;