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


--- src/ftpd.c.orig	2007-01-16 16:43:25.000000000 -0800
+++ src/ftpd.c	2007-01-17 11:23:03.000000000 -0800
@@ -1657,6 +1657,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;