Date: Fri, 7 Jun 2002 09:30:34 -0700 (PDT) From: Peter da Silva <peter@abbnm.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/38987: FTP anonymous user can create directories Message-ID: <200206071630.g57GUYVE031794@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 38987
>Category: misc
>Synopsis: FTP anonymous user can create directories
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Jun 07 09:40:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Peter da Silva
>Release: FreeBSD 4.4-Release
>Organization:
ABB Network Management
>Environment:
FreeBSD foyer.abbnm.com 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Thu Apr 25 03:46:49 CDT 2002 root@foyer.abbnm.com:/usr/src/sys/compile/FOYER i386
>Description:
anonymous user can make directories under incoming and use ftp server as dropbox for warez.
>How-To-Repeat:
ftp localhost
Username: ftp
Password: me@here
ftp> cd pub/incoming
ftp> mkdir dropbox
>Fix:
This should probably be made a command line option. I know "this web form should not be used to submit code as plain text", but the patch is straightforward:
*** ftpd.c.orig Fri Jun 7 06:40:00 2002
--- ftpd.c Fri Jun 7 06:40:25 2002
***************
*** 2187,2193 ****
{
LOGCMD("mkdir", name);
! if (mkdir(name, 0777) < 0)
perror_reply(550, name);
else
reply(257, "MKD command successful.");
--- 2187,2195 ----
{
LOGCMD("mkdir", name);
! if (guest)
! reply(550, "%s: permission denied", name);
! else if (mkdir(name, 0777) < 0)
perror_reply(550, name);
else
reply(257, "MKD command successful.");
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206071630.g57GUYVE031794>
