From: Ezra Peisach Date: Wed, 23 Oct 2002 15:00:23 +0000 (+0000) Subject: * ftpcmd.y: Bison 1.75 cleanup. Essentially remove `=' before X-Git-Tag: krb5-1.3-alpha1~316 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=85d8c3f5fba56e462ed35af39b89b1b2b0b6855c;p=krb5.git * ftpcmd.y: Bison 1.75 cleanup. Essentially remove `=' before statements to be executed. ticket: 1218 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14935 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index 869f79ac3..6e89e0f6b 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,8 @@ +2002-10-23 Ezra Peisach + + * ftpcmd.y: Bison 1.75 cleanup. Essentially remove `=' before + statements to be executed. (ticket 1218). + 2002-08-29 Ken Raeburn * Makefile.in: Revert $(S)=>/ change, for Windows support. diff --git a/src/appl/gssftp/ftpd/ftpcmd.y b/src/appl/gssftp/ftpd/ftpcmd.y index 156ecd33c..bb5b7130e 100644 --- a/src/appl/gssftp/ftpd/ftpcmd.y +++ b/src/appl/gssftp/ftpd/ftpcmd.y @@ -202,7 +202,7 @@ static char *copy(char *); cmd_list: /* empty */ | cmd_list cmd - = { + { fromname = (char *) 0; restart_point = (off_t) 0; } @@ -210,17 +210,17 @@ cmd_list: /* empty */ ; cmd: USER SP username CRLF - = { + { user((char *) $3); free((char *) $3); } | PASS SP password CRLF - = { + { pass((char *) $3); free((char *) $3); } | PORT SP host_port CRLF - = { + { /* * Don't allow a port < 1024 if we're not * connecting back to the original source address @@ -239,19 +239,19 @@ cmd: USER SP username CRLF } } | PASV check_login CRLF - = { + { if ($2) passive(); } | PROT SP prot_code CRLF - = { + { if (maxbuf) setdlevel ($3); else reply(503, "Must first set PBSZ"); } | CCC CRLF - = { + { if (!allow_ccc) { reply(534, "CCC not supported"); } @@ -265,7 +265,7 @@ cmd: USER SP username CRLF } } | PBSZ SP STRING CRLF - = { + { /* Others may want to do something more fancy here */ if (!auth_type) reply(503, "Must first perform authentication"); @@ -290,7 +290,7 @@ cmd: USER SP username CRLF } } | TYPE SP type_code CRLF - = { + { switch (cmd_type) { case TYPE_A: @@ -325,7 +325,7 @@ cmd: USER SP username CRLF } } | STRU SP struct_code CRLF - = { + { switch ($3) { case STRU_F: @@ -337,7 +337,7 @@ cmd: USER SP username CRLF } } | MODE SP mode_code CRLF - = { + { switch ($3) { case MODE_S: @@ -349,78 +349,78 @@ cmd: USER SP username CRLF } } | ALLO SP NUMBER CRLF - = { + { reply(202, "ALLO command ignored."); } | ALLO SP NUMBER SP 'R' SP NUMBER CRLF - = { + { reply(202, "ALLO command ignored."); } | RETR check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) retrieve((char *) 0, (char *) $4); if ($4 != NULL) free((char *) $4); } | STOR check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) store_file((char *) $4, "w", 0); if ($4 != NULL) free((char *) $4); } | APPE check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) store_file((char *) $4, "a", 0); if ($4 != NULL) free((char *) $4); } | NLST check_login CRLF - = { + { if ($2) send_file_list("."); } | NLST check_login SP STRING CRLF - = { + { if ($2 && $4 != NULL) send_file_list((char *) $4); if ($4 != NULL) free((char *) $4); } | LIST check_login CRLF - = { + { if ($2) retrieve("/bin/ls -lgA", ""); } | LIST check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) retrieve("/bin/ls -lgA %s", (char *) $4); if ($4 != NULL) free((char *) $4); } | STAT check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) statfilecmd((char *) $4); if ($4 != NULL) free((char *) $4); } | STAT CRLF - = { + { statcmd(); } | DELE check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) delete_file((char *) $4); if ($4 != NULL) free((char *) $4); } | RNTO SP pathname CRLF - = { + { if (fromname) { renamecmd(fromname, (char *) $3); free(fromname); @@ -431,27 +431,27 @@ cmd: USER SP username CRLF free((char *) $3); } | ABOR CRLF - = { + { reply(225, "ABOR command successful."); } | CWD check_login CRLF - = { + { if ($2) cwd(pw->pw_dir); } | CWD check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) cwd((char *) $4); if ($4 != NULL) free((char *) $4); } | HELP CRLF - = { + { help(cmdtab, (char *) 0); } | HELP SP STRING CRLF - = { + { register char *cp = (char *)$3; if (strncasecmp(cp, "SITE", 4) == 0) { @@ -466,43 +466,43 @@ cmd: USER SP username CRLF help(cmdtab, (char *) $3); } | NOOP CRLF - = { + { reply(200, "NOOP command successful."); } | MKD nonguest SP pathname CRLF - = { + { if ($2 && $4 != NULL) makedir((char *) $4); if ($4 != NULL) free((char *) $4); } | RMD nonguest SP pathname CRLF - = { + { if ($2 && $4 != NULL) removedir((char *) $4); if ($4 != NULL) free((char *) $4); } | PWD check_login CRLF - = { + { if ($2) pwd(); } | CDUP check_login CRLF - = { + { if ($2) cwd(".."); } | SITE SP HELP CRLF - = { + { help(sitetab, (char *) 0); } | SITE SP HELP SP STRING CRLF - = { + { help(sitetab, (char *) $5); } | SITE SP UMASK check_login CRLF - = { + { int oldmask; if ($4) { @@ -512,7 +512,7 @@ cmd: USER SP username CRLF } } | SITE SP UMASK nonguest SP octal_number CRLF - = { + { int oldmask; if ($4) { @@ -527,7 +527,7 @@ cmd: USER SP username CRLF } } | SITE SP CHMOD nonguest SP octal_number SP pathname CRLF - = { + { if ($4 && ($8 != NULL)) { if ($6 > 0777) reply(501, @@ -541,13 +541,13 @@ cmd: USER SP username CRLF free((char *) $8); } | SITE SP IDLE CRLF - = { + { reply(200, "Current IDLE time limit is %d seconds; max %d", timeout, maxtimeout); } | SITE SP IDLE SP NUMBER CRLF - = { + { if ($5 < 30 || $5 > maxtimeout) { reply(501, "Maximum IDLE time must be between 30 and %d seconds", @@ -561,14 +561,14 @@ cmd: USER SP username CRLF } } | STOU check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) store_file((char *) $4, "w", 1); if ($4 != NULL) free((char *) $4); } | SYST CRLF - = { + { #ifdef unix #ifdef __svr4__ #undef BSD @@ -592,7 +592,7 @@ cmd: USER SP username CRLF * using with RESTART (we just count bytes). */ | SIZE check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) sizecmd((char *) $4); if ($4 != NULL) @@ -609,7 +609,7 @@ cmd: USER SP username CRLF * not necessarily 3 digits) */ | MDTM check_login SP pathname CRLF - = { + { if ($2 && $4 != NULL) { struct stat stbuf; if (stat($4, &stbuf) < 0) @@ -632,26 +632,26 @@ cmd: USER SP username CRLF free((char *) $4); } | AUTH SP STRING CRLF - = { + { auth((char *) $3); } | ADAT SP STRING CRLF - = { + { auth_data((char *) $3); free((char *) $3); } | QUIT CRLF - = { + { reply(221, "Goodbye."); dologout(0); } | error CRLF - = { + { yyerrok; } ; rcmd: RNFR check_login SP pathname CRLF - = { + { restart_point = (off_t) 0; if ($2 && $4) { fromname = renamefrom((char *) $4); @@ -661,7 +661,7 @@ rcmd: RNFR check_login SP pathname CRLF } } | REST SP byte_size CRLF - = { + { fromname = (char *) 0; restart_point = $3; reply(350, "Restarting at %ld. %s", @@ -674,7 +674,7 @@ username: STRING ; password: /* empty */ - = { + { *(char **)&($$) = (char *)calloc(1, sizeof(char)); } | STRING @@ -685,7 +685,7 @@ byte_size: NUMBER host_port: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER - = { + { register char *a, *p; a = (char *)&host_port.sin_addr; @@ -697,109 +697,109 @@ host_port: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA ; form_code: 'N' - = { + { $$ = FORM_N; } | 'T' - = { + { $$ = FORM_T; } | 'C' - = { + { $$ = FORM_C; } ; prot_code: 'C' - = { + { $$ = PROT_C; } | 'S' - = { + { $$ = PROT_S; } | 'P' - = { + { $$ = PROT_P; } | 'E' - = { + { $$ = PROT_E; } ; type_code: 'A' - = { + { cmd_type = TYPE_A; cmd_form = FORM_N; } | 'A' SP form_code - = { + { cmd_type = TYPE_A; cmd_form = $3; } | 'E' - = { + { cmd_type = TYPE_E; cmd_form = FORM_N; } | 'E' SP form_code - = { + { cmd_type = TYPE_E; cmd_form = $3; } | 'I' - = { + { cmd_type = TYPE_I; } | 'L' - = { + { cmd_type = TYPE_L; cmd_bytesz = NBBY; } | 'L' SP byte_size - = { + { cmd_type = TYPE_L; cmd_bytesz = $3; } /* this is for a bug in the BBN ftp */ | 'L' byte_size - = { + { cmd_type = TYPE_L; cmd_bytesz = $2; } ; struct_code: 'F' - = { + { $$ = STRU_F; } | 'R' - = { + { $$ = STRU_R; } | 'P' - = { + { $$ = STRU_P; } ; mode_code: 'S' - = { + { $$ = MODE_S; } | 'B' - = { + { $$ = MODE_B; } | 'C' - = { + { $$ = MODE_C; } ; pathname: pathstring - = { + { /* * Problem: this production is used for all pathname * processing, but only gives a 550 error reply. @@ -828,7 +828,7 @@ pathstring: STRING ; octal_number: NUMBER - = { + { register int ret, dec, multby, digit; /* @@ -853,7 +853,7 @@ octal_number: NUMBER ; check_login: /* empty */ - = { + { if (logged_in) $$ = 1; else { @@ -864,7 +864,7 @@ check_login: /* empty */ ; nonguest: check_login - = { + { if (guest) { reply(550, "Operation prohibited for anonymous users."); $$ = 0;