Date: Wed, 19 Jun 2002 12:50:02 -0700 (PDT) From: Zak Johnson <zakj@nox.cx> To: freebsd-qa@FreeBSD.org Subject: Re: misc/25851: Security hole in anonymous FTP setup script Message-ID: <200206191950.g5JJo2x77736@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/25851; it has been noted by GNATS. From: Zak Johnson <zakj@nox.cx> To: freebsd-gnats-submit@FreeBSD.org, tedm@toybox.placo.com Cc: Subject: Re: misc/25851: Security hole in anonymous FTP setup script Date: Wed, 19 Jun 2002 15:46:32 -0400 Sorry, there was an error in the previous patch. -Zak --- anonFTP.c.orig Thu Sep 27 02:38:32 2001 +++ anonFTP.c Wed Jun 19 15:43:02 2002 @@ -298,7 +298,7 @@ if (DITEM_STATUS(createFtpUser()) == DITEM_SUCCESS) { msgNotify("Copying password information for anon FTP."); vsystem("awk -F: '{if ($3 < 10 || $1 == \"ftp\") print $0}' /etc/passwd > %s/etc/passwd && chmod 444 %s/etc/passwd", tconf.homedir, tconf.homedir); - vsystem("awk -F: '{if ($3 < 100) print $0}' /etc/group > %s/etc/group && chmod 444 %s/etc/group", tconf.homedir, tconf.homedir); + vsystem("awk -F: '!/^#/ {if ($3 < 100) printf \"%%s:%%s:%%s:\\n\", $1, $2, $3}' /etc/group > %s/etc/group && chmod 444 %s/etc/group", tconf.homedir, tconf.homedir); vsystem("chown -R root.%s %s/pub", tconf.group, tconf.homedir); } else { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-qa" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206191950.g5JJo2x77736>