From owner-freebsd-bugs Fri Apr 19 6:30: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7D16437B41B for ; Fri, 19 Apr 2002 06:30:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3JDU3Q39630; Fri, 19 Apr 2002 06:30:03 -0700 (PDT) (envelope-from gnats) Date: Fri, 19 Apr 2002 06:30:03 -0700 (PDT) Message-Id: <200204191330.g3JDU3Q39630@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Nino Dehne Subject: Re: bin/37250: [PATCH] ftpd(8) cannot delete stale symlinks Reply-To: Nino Dehne Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/37250; it has been noted by GNATS. From: Nino Dehne To: freebsd-gnats-submit@FreeBSD.org, ndehne@clan-planet.ch Cc: Subject: Re: bin/37250: [PATCH] ftpd(8) cannot delete stale symlinks Date: Fri, 19 Apr 2002 15:24:18 +0200 >Fix: (hit submit too fast *sigh*. here's the fix) I am no C coder. Reading on stat(2) and lstat(2) makes me think the following patch should work. Please comment. --- ftpd.c.patch begins here --- --- /usr/src/libexec/ftpd/ftpd.c Tue Dec 18 19:35:55 2001 +++ ftpd.c.new Fri Apr 19 13:04:42 2002 @@ -2180,7 +2180,7 @@ struct stat st; LOGCMD("delete", name); - if (stat(name, &st) < 0) { + if (lstat(name, &st) < 0) { perror_reply(550, name); return; } --- ftpd.c.patch ends here --- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message