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


--- src/ftpd.c.orig	Mon Aug  9 20:53:35 2004
+++ src/ftpd.c	Fri Jan  7 22:38:20 2005
@@ -776,8 +776,14 @@
 			goto cleanup_user;
 		}
 		name = "ftp";
-	} else
+	} else {
 		pw = sgetpwnam(name);
+
+		/* Get the real username; getpwnam() works with long usernames. */
+		if (pw != NULL) {
+			name = pw->pw_name;
+		}
+	}
 
 	strlcpy(curname, name, curname_len);