From 7f4ac6d6b0f046baafe60b3bad30f91e6b47b407 Mon Sep 17 00:00:00 2001 From: dholland Date: Sun, 4 Mar 2018 19:57:41 +0000 Subject: [PATCH] Don't use the local username as the default anonftp password. once upon a time doing this was part of the social glue that held the community together, but that was a long time ago, and now it's just an information leak. proposed on tech-userlevel in 2008, then apparently forgotten :-| --- usr.bin/ftp/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 38d31bed80e1..681a965661c8 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.124 2017/11/25 15:39:17 christos Exp $ */ +/* $NetBSD: main.c,v 1.125 2018/03/04 19:57:41 dholland Exp $ */ /*- * Copyright (c) 1996-2015 The NetBSD Foundation, Inc. @@ -98,7 +98,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\ #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$NetBSD: main.c,v 1.124 2017/11/25 15:39:17 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.125 2018/03/04 19:57:41 dholland Exp $"); #endif #endif /* not lint */ @@ -464,7 +464,6 @@ main(int volatile argc, char **volatile argv) if (localhome == NULL && !EMPTYSTRING(pw->pw_dir)) localhome = ftp_strdup(pw->pw_dir); localname = ftp_strdup(pw->pw_name); - anonuser = localname; } if (netrc[0] == '\0' && localhome != NULL) { if (strlcpy(netrc, localhome, sizeof(netrc)) >= sizeof(netrc) ||