summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2003-01-29 17:04:07 +0000
committeryar <yar@FreeBSD.org>2003-01-29 17:04:07 +0000
commit6962d02957b5fa66a727f89d2131a673d1a83c7a (patch)
treed8dbf5fad5fbc9f5dc5a89dd1346420fb0d890b4 /libexec/ftpd
parent7a73a2b78e37acf45b1fc1c873c6de17890b3f21 (diff)
downloadFreeBSD-src-6962d02957b5fa66a727f89d2131a673d1a83c7a.zip
FreeBSD-src-6962d02957b5fa66a727f89d2131a673d1a83c7a.tar.gz
When searching for a unique file name in guniquefd(),
distinguish between the cases of an existing file and a real system error, such as I/O failure, no access etc. MFC after: 3 days
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index bc96d2d..cf7d73d 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -2909,6 +2909,10 @@ guniquefd(char *local, char **name)
*name = count ? new : local;
return (fd);
}
+ if (errno != EEXIST) {
+ perror_reply(550, count ? new : local);
+ return (-1);
+ }
}
reply(452, "Unique file name cannot be created.");
return (-1);
OpenPOWER on IntegriCloud