diff options
author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2003-01-29 17:04:07 +0000 |
---|---|---|
committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2003-01-29 17:04:07 +0000 |
commit | 88b707218ecab37538c0ba42c63c202a7ded8a48 (patch) | |
tree | d8dbf5fad5fbc9f5dc5a89dd1346420fb0d890b4 /libexec/ftpd | |
parent | 7054e8482e9104b248993e36e3cd0476f78a2adb (diff) | |
download | src-88b707218ecab37538c0ba42c63c202a7ded8a48.tar.gz src-88b707218ecab37538c0ba42c63c202a7ded8a48.zip |
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
Notes
Notes:
svn path=/head/; revision=110046
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |