Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 2002 06:30:03 -0700 (PDT)
From:      Nino Dehne <TeCeEm@gmx.de>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/37250: [PATCH] ftpd(8) cannot delete stale symlinks
Message-ID:  <200204191330.g3JDU3Q39630@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/37250; it has been noted by GNATS.

From: Nino Dehne <TeCeEm@gmx.de>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204191330.g3JDU3Q39630>