diff options
author | yar <yar@FreeBSD.org> | 2002-07-21 12:06:56 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2002-07-21 12:06:56 +0000 |
commit | 81d786a9d6d86b59e4394c089a00ce0eab802106 (patch) | |
tree | 09b58b87ecd74d0f6b45f97c6e85bca816f4c827 /libexec/ftpd | |
parent | 6c7dddef247aa29c7ba3885c77f0ac1093e6a08a (diff) | |
download | FreeBSD-src-81d786a9d6d86b59e4394c089a00ce0eab802106.zip FreeBSD-src-81d786a9d6d86b59e4394c089a00ce0eab802106.tar.gz |
Allow deleting and renaming stale symlinks and
deleting symlinks pointing to directories.
PR: bin/37250
Submitted by: Nino Dehne <TeCeEm@gmx.de>
MFC after: 1 week
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index e250571..14ba477 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2271,7 +2271,7 @@ delete(char *name) struct stat st; LOGCMD("delete", name); - if (stat(name, &st) < 0) { + if (lstat(name, &st) < 0) { perror_reply(550, name); return; } @@ -2340,7 +2340,7 @@ renamefrom(char *name) { struct stat st; - if (stat(name, &st) < 0) { + if (lstat(name, &st) < 0) { perror_reply(550, name); return ((char *)0); } |