From a50bdf3ed151ca342426240e469ef0bf340b8b50 Mon Sep 17 00:00:00 2001 From: yar Date: Wed, 29 Jan 2003 17:04:07 +0000 Subject: [PATCH] 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 --- libexec/ftpd/ftpd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index bc96d2d6211e..cf7d73de2a14 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);