PR-4616924.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
@@ -1728,6 +1728,10 @@
 			reply(550, "Can't set gid.");
 			goto bad;
 		}
+		if (initgroups(pw->pw_name, (gid_t)pw->pw_gid) < 0) {
+		        reply(550, "Can't initgroups.");
+			goto bad;
+		}
 		if (setuid((uid_t)pw->pw_uid) < 0) {
 			reply(550, "Can't set uid.");
 			goto bad;