aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2002-08-05 14:10:57 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2002-08-05 14:10:57 +0000
commitc452fbe11c533585a8e4cec7d5146feeec70393a (patch)
treeb8f78605a714bcd5cff6a89cc40c749d3911ad7d /libexec
parent255a70376b8d62d046e25aa4c899557600baf693 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpcmd.y5
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index d7ffc73ff6c06..2284f029fba87 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -647,9 +647,8 @@ cmd
| SITE SP CHMOD check_login_ro SP octal_number SP pathname CRLF
{
if ($4 && ($8 != NULL)) {
- if ($6 > 0777)
- reply(501,
- "CHMOD: Mode value must be between 0 and 0777");
+ if (($6 == -1 ) || ($6 > 0777))
+ reply(501, "Bad mode value");
else if (chmod($8, $6) < 0)
perror_reply(550, $8);
else