summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2002-07-21 12:06:56 +0000
committeryar <yar@FreeBSD.org>2002-07-21 12:06:56 +0000
commit81d786a9d6d86b59e4394c089a00ce0eab802106 (patch)
tree09b58b87ecd74d0f6b45f97c6e85bca816f4c827 /libexec/ftpd
parent6c7dddef247aa29c7ba3885c77f0ac1093e6a08a (diff)
downloadFreeBSD-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.c4
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);
}
OpenPOWER on IntegriCloud