From 88b707218ecab37538c0ba42c63c202a7ded8a48 Mon Sep 17 00:00:00 2001 From: Yaroslav Tykhiy Date: Wed, 29 Jan 2003 17:04:07 +0000 Subject: 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(+) (limited to 'libexec/ftpd') 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); -- cgit v1.3