=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/ftp.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/ftp/ftp.c 1996/06/26 05:33:36 1.4 --- src/usr.bin/ftp/ftp.c 1996/08/02 05:56:23 1.5 *************** *** 1,4 **** ! /* $OpenBSD: ftp.c,v 1.4 1996/06/26 05:33:36 deraadt Exp $ */ /* $NetBSD: ftp.c,v 1.13 1995/09/16 22:32:59 pk Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: ftp.c,v 1.5 1996/08/02 05:56:23 deraadt Exp $ */ /* $NetBSD: ftp.c,v 1.13 1995/09/16 22:32:59 pk Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else ! static char rcsid[] = "$OpenBSD: ftp.c,v 1.4 1996/06/26 05:33:36 deraadt Exp $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else ! static char rcsid[] = "$OpenBSD: ftp.c,v 1.5 1996/08/02 05:56:23 deraadt Exp $"; #endif #endif /* not lint */ *************** *** 202,209 **** char tmp[80]; char *user, *pass, *acct; int n, aflag = 0; ! char anonpass[MAXHOSTNAMELEN+2+32]; ! char hostname[MAXHOSTNAMELEN]; user = pass = acct = 0; if (ruserpass(host, &user, &pass, &acct) < 0) { --- 202,208 ---- char tmp[80]; char *user, *pass, *acct; int n, aflag = 0; ! char anonpass[32+1]; user = pass = acct = 0; if (ruserpass(host, &user, &pass, &acct) < 0) { *************** *** 212,221 **** } if (anonftp) { user = getlogin(); ! strncpy(anonpass, user, 32); ! strcat(anonpass, "@"); ! gethostname(hostname, sizeof hostname); ! strcat(anonpass, hostname); pass = anonpass; user = "anonymous"; } --- 211,218 ---- } if (anonftp) { user = getlogin(); ! strncpy(anonpass, user, sizeof anonpass); ! strncat(anonpass, "@", sizeof anonpass); pass = anonpass; user = "anonymous"; }