1 /* $NetBSD: ftpcmd.y,v 1.6 1995/06/03 22:46:45 mycroft Exp $ */
4 * Copyright (c) 1985, 1988, 1993, 1994
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 * 4. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * @(#)ftpcmd.y 8.3 (Berkeley) 4/6/94
39 * Grammar for FTP commands.
45 #include "ftpd_locl.h"
46 RCSID("$Id: ftpcmd.y,v 1.56 1999/10/26 11:56:23 assar Exp $");
52 static int cmd_bytesz;
60 short implemented; /* 1 if command is implemented */
64 extern struct tab cmdtab[];
65 extern struct tab sitetab[];
67 static char *copy (char *);
68 static void help (struct tab *, char *);
70 lookup (struct tab *, char *);
71 static void sizecmd (char *);
72 static RETSIGTYPE toolong (int);
73 static int yylex (void);
75 /* This is for bison */
77 #if !defined(alloca) && !defined(HAVE_ALLOCA)
78 #define alloca(x) malloc(x)
94 USER PASS ACCT REIN QUIT PORT
95 PASV TYPE STRU MODE RETR STOR
96 APPE MLFL MAIL MSND MSOM MSAM
97 MRSQ MRCP ALLO REST RNFR RNTO
98 ABOR DELE CWD LIST NLST SITE
99 sTAT HELP NOOP MKD RMD PWD
100 CDUP STOU SMNT SYST SIZE MDTM
105 AUTH ADAT PROT PBSZ CCC MIC
108 KAUTH KLIST KDESTROY KRBTKFILE AFSLOG
118 %type <i> check_login check_login_no_guest check_secure octal_number byte_size
119 %type <i> struct_code mode_code type_code form_code
120 %type <s> pathstring pathname password username
130 fromname = (char *) 0;
131 restart_point = (off_t) 0;
137 : USER SP username CRLF
142 | PASS SP password CRLF
145 memset ($3, 0, strlen($3));
148 | PORT SP host_port CRLF
155 reply(200, "PORT command successful.");
157 | EPRT SP STRING CRLF
170 | EPSV SP STRING CRLF
175 | TYPE SP type_code CRLF
180 if (cmd_form == FORM_N) {
181 reply(200, "Type set to A.");
185 reply(504, "Form must be N.");
189 reply(504, "Type E not implemented.");
193 reply(200, "Type set to I.");
199 if (cmd_bytesz == 8) {
201 "Type set to L (byte size 8).");
204 reply(504, "Byte size must be 8.");
205 #else /* NBBY == 8 */
206 UNIMPLEMENTED for NBBY != 8
207 #endif /* NBBY == 8 */
210 | STRU SP struct_code CRLF
215 reply(200, "STRU F ok.");
219 reply(504, "Unimplemented STRU type.");
222 | MODE SP mode_code CRLF
227 reply(200, "MODE S ok.");
231 reply(502, "Unimplemented MODE type.");
234 | ALLO SP NUMBER CRLF
236 reply(202, "ALLO command ignored.");
238 | ALLO SP NUMBER SP R SP NUMBER CRLF
240 reply(202, "ALLO command ignored.");
242 | RETR SP pathname CRLF check_login
246 if ($5 && name != NULL)
251 | STOR SP pathname CRLF check_login
255 if ($5 && name != NULL)
256 do_store(name, "w", 0);
260 | APPE SP pathname CRLF check_login
264 if ($5 && name != NULL)
265 do_store(name, "a", 0);
269 | NLST CRLF check_login
274 | NLST SP STRING CRLF check_login
278 if ($5 && name != NULL)
279 send_file_list(name);
283 | LIST CRLF check_login
288 | LIST SP pathname CRLF check_login
294 | sTAT SP pathname CRLF check_login
296 if ($5 && $3 != NULL)
304 if (file_size != (off_t) -1)
305 reply(213, "Status: %lu of %lu bytes transferred",
306 (unsigned long)byte_count,
307 (unsigned long)file_size);
309 reply(213, "Status: %lu bytes transferred",
310 (unsigned long)byte_count);
314 | DELE SP pathname CRLF check_login_no_guest
316 if ($5 && $3 != NULL)
321 | RNTO SP pathname CRLF check_login_no_guest
325 renamecmd(fromname, $3);
327 fromname = (char *) 0;
329 reply(503, "Bad sequence of commands.");
338 reply(426, "Transfer aborted. Data connection closed.");
339 reply(226, "Abort successful");
341 longjmp(urgcatch, 1);
343 reply(225, "ABOR command successful.");
345 | CWD CRLF check_login
350 | CWD SP pathname CRLF check_login
352 if ($5 && $3 != NULL)
359 help(cmdtab, (char *) 0);
361 | HELP SP STRING CRLF
365 if (strncasecmp(cp, "SITE", 4) == 0) {
372 help(sitetab, (char *) 0);
378 reply(200, "NOOP command successful.");
380 | MKD SP pathname CRLF check_login
382 if ($5 && $3 != NULL)
387 | RMD SP pathname CRLF check_login_no_guest
389 if ($5 && $3 != NULL)
394 | PWD CRLF check_login
399 | CDUP CRLF check_login
406 lreply(211, "Supported features:");
408 lreply(0, " REST STREAM");
412 | OPTS SP STRING CRLF
415 reply(501, "Bad options");
420 help(sitetab, (char *) 0);
422 | SITE SP HELP SP STRING CRLF
426 | SITE SP UMASK CRLF check_login
429 int oldmask = umask(0);
431 reply(200, "Current UMASK is %03o", oldmask);
434 | SITE SP UMASK SP octal_number CRLF check_login_no_guest
437 if (($5 == -1) || ($5 > 0777)) {
438 reply(501, "Bad UMASK value");
440 int oldmask = umask($5);
442 "UMASK set to %03o (was %03o)",
447 | SITE SP CHMOD SP octal_number SP pathname CRLF check_login_no_guest
449 if ($9 && $7 != NULL) {
452 "CHMOD: Mode value must be between 0 and 0777");
453 else if (chmod($7, $5) < 0)
454 perror_reply(550, $7);
456 reply(200, "CHMOD command successful.");
464 "Current IDLE time limit is %d seconds; max %d",
465 ftpd_timeout, maxtimeout);
467 | SITE SP IDLE SP NUMBER CRLF
469 if ($5 < 30 || $5 > maxtimeout) {
471 "Maximum IDLE time must be between 30 and %d seconds",
475 alarm((unsigned) ftpd_timeout);
477 "Maximum IDLE time set to %d seconds",
482 | SITE SP KAUTH SP STRING CRLF check_login
488 reply(500, "Can't be done as guest.");
490 if($7 && $5 != NULL){
491 p = strpbrk($5, " \t");
494 kauth($5, p + strspn(p, " \t"));
502 reply(500, "Command not implemented.");
505 | SITE SP KLIST CRLF check_login
511 reply(500, "Command not implemented.");
514 | SITE SP KDESTROY CRLF check_login
520 reply(500, "Command not implemented.");
523 | SITE SP KRBTKFILE SP STRING CRLF check_login
527 reply(500, "Can't be done as guest.");
533 reply(500, "Command not implemented.");
536 | SITE SP AFSLOG CRLF check_login
540 reply(500, "Can't be done as guest.");
544 reply(500, "Command not implemented.");
547 | SITE SP AFSLOG SP STRING CRLF check_login
551 reply(500, "Can't be done as guest.");
557 reply(500, "Command not implemented.");
560 | SITE SP LOCATE SP STRING CRLF check_login
569 reply(200, "http://www.pdc.kth.se/kth-krb/");
571 | STOU SP pathname CRLF check_login
573 if ($5 && $3 != NULL)
574 do_store($3, "w", 1);
580 #if defined(unix) || defined(__unix__) || defined(__unix) || defined(_AIX) || defined(_CRAY)
581 reply(215, "UNIX Type: L%d", NBBY);
583 reply(215, "UNKNOWN Type: L%d", NBBY);
588 * SIZE is not in RFC959, but Postel has blessed it and
589 * it will be in the updated RFC.
591 * Return size of file in a format suitable for
592 * using with RESTART (we just count bytes).
594 | SIZE SP pathname CRLF check_login
596 if ($5 && $3 != NULL)
603 * MDTM is not in RFC959, but Postel has blessed it and
604 * it will be in the updated RFC.
606 * Return modification time of file as an ISO 3307
607 * style time. E.g. YYYYMMDDHHMMSS or YYYYMMDDHHMMSS.xxx
608 * where xxx is the fractional second (of any precision,
609 * not necessarily 3 digits)
611 | MDTM SP pathname CRLF check_login
613 if ($5 && $3 != NULL) {
615 if (stat($3, &stbuf) < 0)
617 $3, strerror(errno));
618 else if (!S_ISREG(stbuf.st_mode)) {
620 "%s: not a plain file.", $3);
623 t = gmtime(&stbuf.st_mtime);
625 "%04d%02d%02d%02d%02d%02d",
639 reply(221, "Goodbye.");
648 : RNFR SP pathname CRLF check_login_no_guest
650 restart_point = (off_t) 0;
652 fromname = renamefrom($3);
653 if (fromname == (char *) 0 && $3) {
658 | REST SP byte_size CRLF
660 fromname = (char *) 0;
661 restart_point = $3; /* XXX $3 is only "int" */
662 reply(350, "Restarting at %ld. %s",
664 "Send STORE or RETRIEVE to initiate transfer.");
666 | AUTH SP STRING CRLF
671 | ADAT SP STRING CRLF
676 | PBSZ SP NUMBER CRLF
680 | PROT SP STRING CRLF
693 | CONF SP STRING CRLF
695 mec($3, prot_confidential);
700 mec($3, prot_private);
712 $$ = (char *)calloc(1, sizeof(char));
722 : NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
725 struct sockaddr_in *sin = (struct sockaddr_in *)data_dest;
727 sin->sin_family = AF_INET;
728 sin->sin_port = htons($9 * 256 + $11);
729 sin->sin_addr.s_addr =
730 htonl(($1 << 24) | ($3 << 16) | ($5 << 8) | $7);
784 /* this is for a bug in the BBN ftp */
826 * Problem: this production is used for all pathname
827 * processing, but only gives a 550 error reply.
828 * This is a valid reply in some cases but not in others.
830 if (logged_in && $1 && *$1 == '~') {
833 GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
835 memset(&gl, 0, sizeof(gl));
836 if (glob($1, flags, NULL, &gl) ||
838 reply(550, "not found");
841 $$ = strdup(gl.gl_pathv[0]);
857 int ret, dec, multby, digit;
860 * Convert a number that was read as decimal number
861 * to what it would be if it had been read as octal.
872 ret += digit * multby;
881 check_login_no_guest : check_login
885 reply(550, "Permission denied");
889 check_login : check_secure
892 if(($$ = logged_in) == 0)
893 reply(530, "Please login with USER and PASS.");
899 check_secure : /* empty */
902 if(sec_complete && !secure_command()) {
904 reply(533, "Command protection level denied "
905 "for paranoid reasons.");
912 extern jmp_buf errcatch;
914 #define CMD 0 /* beginning of command */
915 #define ARGS 1 /* expect miscellaneous arguments */
916 #define STR1 2 /* expect SP followed by STRING */
917 #define STR2 3 /* expect STRING */
918 #define OSTR 4 /* optional SP then STRING */
919 #define ZSTR1 5 /* SP then optional STRING */
920 #define ZSTR2 6 /* optional STRING after SP */
921 #define SITECMD 7 /* SITE command */
922 #define NSTR 8 /* Number followed by a string */
924 struct tab cmdtab[] = { /* In order defined in RFC 765 */
925 { "USER", USER, STR1, 1, "<sp> username" },
926 { "PASS", PASS, ZSTR1, 1, "<sp> password" },
927 { "ACCT", ACCT, STR1, 0, "(specify account)" },
928 { "SMNT", SMNT, ARGS, 0, "(structure mount)" },
929 { "REIN", REIN, ARGS, 0, "(reinitialize server state)" },
930 { "QUIT", QUIT, ARGS, 1, "(terminate service)", },
931 { "PORT", PORT, ARGS, 1, "<sp> b0, b1, b2, b3, b4" },
932 { "EPRT", EPRT, STR1, 1, "<sp> string" },
933 { "PASV", PASV, ARGS, 1, "(set server in passive mode)" },
934 { "EPSV", EPSV, OSTR, 1, "[<sp> foo]" },
935 { "TYPE", TYPE, ARGS, 1, "<sp> [ A | E | I | L ]" },
936 { "STRU", STRU, ARGS, 1, "(specify file structure)" },
937 { "MODE", MODE, ARGS, 1, "(specify transfer mode)" },
938 { "RETR", RETR, STR1, 1, "<sp> file-name" },
939 { "STOR", STOR, STR1, 1, "<sp> file-name" },
940 { "APPE", APPE, STR1, 1, "<sp> file-name" },
941 { "MLFL", MLFL, OSTR, 0, "(mail file)" },
942 { "MAIL", MAIL, OSTR, 0, "(mail to user)" },
943 { "MSND", MSND, OSTR, 0, "(mail send to terminal)" },
944 { "MSOM", MSOM, OSTR, 0, "(mail send to terminal or mailbox)" },
945 { "MSAM", MSAM, OSTR, 0, "(mail send to terminal and mailbox)" },
946 { "MRSQ", MRSQ, OSTR, 0, "(mail recipient scheme question)" },
947 { "MRCP", MRCP, STR1, 0, "(mail recipient)" },
948 { "ALLO", ALLO, ARGS, 1, "allocate storage (vacuously)" },
949 { "REST", REST, ARGS, 1, "<sp> offset (restart command)" },
950 { "RNFR", RNFR, STR1, 1, "<sp> file-name" },
951 { "RNTO", RNTO, STR1, 1, "<sp> file-name" },
952 { "ABOR", ABOR, ARGS, 1, "(abort operation)" },
953 { "DELE", DELE, STR1, 1, "<sp> file-name" },
954 { "CWD", CWD, OSTR, 1, "[ <sp> directory-name ]" },
955 { "XCWD", CWD, OSTR, 1, "[ <sp> directory-name ]" },
956 { "LIST", LIST, OSTR, 1, "[ <sp> path-name ]" },
957 { "NLST", NLST, OSTR, 1, "[ <sp> path-name ]" },
958 { "SITE", SITE, SITECMD, 1, "site-cmd [ <sp> arguments ]" },
959 { "SYST", SYST, ARGS, 1, "(get type of operating system)" },
960 { "STAT", sTAT, OSTR, 1, "[ <sp> path-name ]" },
961 { "HELP", HELP, OSTR, 1, "[ <sp> <string> ]" },
962 { "NOOP", NOOP, ARGS, 1, "" },
963 { "MKD", MKD, STR1, 1, "<sp> path-name" },
964 { "XMKD", MKD, STR1, 1, "<sp> path-name" },
965 { "RMD", RMD, STR1, 1, "<sp> path-name" },
966 { "XRMD", RMD, STR1, 1, "<sp> path-name" },
967 { "PWD", PWD, ARGS, 1, "(return current directory)" },
968 { "XPWD", PWD, ARGS, 1, "(return current directory)" },
969 { "CDUP", CDUP, ARGS, 1, "(change to parent directory)" },
970 { "XCUP", CDUP, ARGS, 1, "(change to parent directory)" },
971 { "STOU", STOU, STR1, 1, "<sp> file-name" },
972 { "SIZE", SIZE, OSTR, 1, "<sp> path-name" },
973 { "MDTM", MDTM, OSTR, 1, "<sp> path-name" },
975 /* extensions from RFC2228 */
976 { "AUTH", AUTH, STR1, 1, "<sp> auth-type" },
977 { "ADAT", ADAT, STR1, 1, "<sp> auth-data" },
978 { "PBSZ", PBSZ, ARGS, 1, "<sp> buffer-size" },
979 { "PROT", PROT, STR1, 1, "<sp> prot-level" },
980 { "CCC", CCC, ARGS, 1, "" },
981 { "MIC", MIC, STR1, 1, "<sp> integrity command" },
982 { "CONF", CONF, STR1, 1, "<sp> confidentiality command" },
983 { "ENC", ENC, STR1, 1, "<sp> privacy command" },
986 { "FEAT", FEAT, ARGS, 1, "" },
987 { "OPTS", OPTS, ARGS, 1, "<sp> command [<sp> options]" },
992 struct tab sitetab[] = {
993 { "UMASK", UMASK, ARGS, 1, "[ <sp> umask ]" },
994 { "IDLE", IDLE, ARGS, 1, "[ <sp> maximum-idle-time ]" },
995 { "CHMOD", CHMOD, NSTR, 1, "<sp> mode <sp> file-name" },
996 { "HELP", HELP, OSTR, 1, "[ <sp> <string> ]" },
998 { "KAUTH", KAUTH, STR1, 1, "<sp> principal [ <sp> ticket ]" },
999 { "KLIST", KLIST, ARGS, 1, "(show ticket file)" },
1000 { "KDESTROY", KDESTROY, ARGS, 1, "(destroy tickets)" },
1001 { "KRBTKFILE", KRBTKFILE, STR1, 1, "<sp> ticket-file" },
1002 { "AFSLOG", AFSLOG, OSTR, 1, "[<sp> cell]" },
1004 { "LOCATE", LOCATE, STR1, 1, "<sp> globexpr" },
1005 { "FIND", LOCATE, STR1, 1, "<sp> globexpr" },
1007 { "URL", URL, ARGS, 1, "?" },
1009 { NULL, 0, 0, 0, 0 }
1013 lookup(struct tab *p, char *cmd)
1016 for (; p->name != NULL; p++)
1017 if (strcmp(cmd, p->name) == 0)
1023 * ftpd_getline - a hacked up version of fgets to ignore TELNET escape codes.
1026 ftpd_getline(char *s, int n)
1032 /* tmpline may contain saved command from urgent mode interruption */
1034 strlcpy(s, ftp_command, n);
1036 syslog(LOG_DEBUG, "command: %s", s);
1038 fprintf(stderr, "%s\n", s);
1042 while ((c = getc(stdin)) != EOF) {
1045 if ((c = getc(stdin)) != EOF) {
1051 printf("%c%c%c", IAC, DONT, 0377&c);
1057 printf("%c%c%c", IAC, WONT, 0377&c);
1063 continue; /* ignore command */
1068 if (--n <= 0 || c == '\n')
1071 if (c == EOF && cs == s)
1075 if (!guest && strncasecmp("pass ", s, 5) == 0) {
1076 /* Don't syslog passwords */
1077 syslog(LOG_DEBUG, "command: %.5s ???", s);
1082 /* Don't syslog trailing CR-LF */
1085 while (cp >= s && (*cp == '\n' || *cp == '\r')) {
1089 syslog(LOG_DEBUG, "command: %.*s", len, s);
1093 fprintf(stderr, "%s\n", s);
1103 "Timeout (%d seconds): closing control connection.",
1106 syslog(LOG_INFO, "User %s timed out after %d seconds",
1107 (pw ? pw -> pw_name : "unknown"), ftpd_timeout);
1115 static int cpos, state;
1125 signal(SIGALRM, toolong);
1126 alarm((unsigned) ftpd_timeout);
1127 if (ftpd_getline(cbuf, sizeof(cbuf)-1) == NULL) {
1128 reply(221, "You could at least say goodbye.");
1132 #ifdef HAVE_SETPROCTITLE
1133 if (strncasecmp(cbuf, "PASS", 4) != NULL)
1134 setproctitle("%s: %s", proctitle, cbuf);
1135 #endif /* HAVE_SETPROCTITLE */
1136 if ((cp = strchr(cbuf, '\r'))) {
1140 if ((cp = strpbrk(cbuf, " \n")))
1147 p = lookup(cmdtab, cbuf);
1150 if (p->implemented == 0) {
1152 longjmp(errcatch,0);
1162 if (cbuf[cpos] == ' ') {
1167 if ((cp2 = strpbrk(cp, " \n")))
1172 p = lookup(sitetab, cp);
1175 if (p->implemented == 0) {
1178 longjmp(errcatch,0);
1189 if (cbuf[cpos] == '\n') {
1198 if (cbuf[cpos] == ' ') {
1209 if (cbuf[cpos] == '\n') {
1220 * Make sure the string is nonempty and \n terminated.
1222 if (n > 1 && cbuf[cpos] == '\n') {
1224 yylval.s = copy(cp);
1232 if (cbuf[cpos] == ' ') {
1236 if (isdigit(cbuf[cpos])) {
1238 while (isdigit(cbuf[++cpos]))
1242 yylval.i = atoi(cp);
1251 if (isdigit(cbuf[cpos])) {
1253 while (isdigit(cbuf[++cpos]))
1257 yylval.i = atoi(cp);
1261 switch (cbuf[cpos++]) {
1325 fatal("Unknown state in scanner.");
1327 yyerror((char *) 0);
1329 longjmp(errcatch,0);
1340 fatal("Ran out of memory.");
1345 help(struct tab *ctab, char *s)
1352 if (ctab == sitetab)
1356 width = 0, NCMDS = 0;
1357 for (c = ctab; c->name != NULL; c++) {
1358 int len = strlen(c->name);
1364 width = (width + 8) &~ 7;
1369 lreply(214, "The following %scommands are recognized %s.",
1370 type, "(* =>'s unimplemented)");
1371 columns = 76 / width;
1374 lines = (NCMDS + columns - 1) / columns;
1375 for (i = 0; i < lines; i++) {
1376 strlcpy (buf, " ", sizeof(buf));
1377 for (j = 0; j < columns; j++) {
1378 c = ctab + j * lines + i;
1379 snprintf (buf + strlen(buf),
1380 sizeof(buf) - strlen(buf),
1383 c->implemented ? ' ' : '*');
1384 if (c + lines >= &ctab[NCMDS])
1386 w = strlen(c->name) + 1;
1394 lreply(214, "%s", buf);
1396 reply(214, "Direct comments to kth-krb-bugs@pdc.kth.se");
1400 c = lookup(ctab, s);
1401 if (c == (struct tab *)0) {
1402 reply(502, "Unknown command %s.", s);
1406 reply(214, "Syntax: %s%s %s", type, c->name, c->help);
1408 reply(214, "%s%-*s\t%s; unimplemented.", type, width,
1413 sizecmd(char *filename)
1419 if (stat(filename, &stbuf) < 0 || !S_ISREG(stbuf.st_mode))
1420 reply(550, "%s: not a plain file.", filename);
1422 reply(213, "%lu", (unsigned long)stbuf.st_size);
1430 fin = fopen(filename, "r");
1432 perror_reply(550, filename);
1435 if (fstat(fileno(fin), &stbuf) < 0 || !S_ISREG(stbuf.st_mode)) {
1436 reply(550, "%s: not a plain file.", filename);
1442 while((c=getc(fin)) != EOF) {
1443 if (c == '\n') /* will get expanded to \r\n */
1449 reply(213, "%lu", (unsigned long)count);
1453 reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]);