#include <sys/types.h>#include <signal.h>#include <stdio.h>#include <stdlib.h>#include <ctype.h>#include <string.h>#include <time.h>#include <unistd.h>#include <net/gen/in.h>#include <net/gen/tcp.h>#include "ftpd.h"#include "access.h"#include "file.h"#include "net.h"Include dependency graph for ftpd.c:

Go to the source code of this file.
Data Structures | |
| struct | commands |
Defines | |
| #define | INACTIVITY_TIMEOUT 60*5 |
| #define | FTPD_LOG "/usr/adm/ftpd.log" |
| #define | FTPD_MSG "/etc/ftpd_msg" |
Functions | |
| _PROTOTYPE (static void init,(void)) | |
| _PROTOTYPE (static int doHELP,(char *buff)) | |
| _PROTOTYPE (static int getline,(char *line, int len)) | |
| _PROTOTYPE (int readline,(char **args)) | |
| _PROTOTYPE (void Timeout,(int sig)) | |
| _PROTOTYPE (int main,(int argc, char *argv[])) | |
| static void | init () |
| static int | doNOOP (char *buff) |
| static int | doHELP (char *buff) |
| static int | doUNIMP (char *buff) |
| void | cvtline (char **args) |
| static int | getline (char *line, int len) |
| int | readline (char **args) |
| void | Timeout (int sig) |
| void | logit (char *type, char *parm) |
| void | showmsg (char *reply, char *filename) |
| int | main (int argc, argv) |
Variables | |
| char * | FtpdVersion = "2.00" |
| FILE * | msgfile = (FILE *)NULL |
| char * | days [] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"} |
| char * | months [] |
| char | line [512] |
| int | type |
| int | format |
| int | mode |
| int | structure |
| int | ftpdata_fd = -1 |
| int | loggedin |
| int | gotuser |
| int | anonymous |
| char | username [80] |
| char | anonpass [128] |
| char | newroot [128] |
| ipaddr_t | myipaddr |
| ipaddr_t | rmtipaddr |
| ipaddr_t | dataaddr |
| tcpport_t | myport |
| tcpport_t | rmtport |
| tcpport_t | dataport |
| char | myhostname [256] |
| char | rmthostname [256] |
| FILE * | logfile |
| int | timeout = 0 |
| commands | commands [] |
|
|
Definition at line 71 of file ftpd.c. Referenced by main(). |
|
|
Definition at line 72 of file ftpd.c. Referenced by main(). |
|
|
Definition at line 51 of file ftpd.c. Referenced by main(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Definition at line 199 of file ftpd.c. References isspace, logit(), p, strlen(), and toupper. Referenced by doSITE(), and readline(). |
|
|
Definition at line 157 of file ftpd.c. References cmd, commands, i, printf, space(), star(), and strlen(). |
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
Definition at line 287 of file ftpd.c. References fflush(), fprintf(), localtime(), logfile, now, NULL, time, time_t, tm::tm_hour, tm::tm_mday, tm::tm_min, tm::tm_mon, tm::tm_sec, and tm::tm_year. Referenced by AreWeIn(), cvtline(), doDELE(), doMKD(), doPASS(), doRMD(), doRNTO(), main(), recvfile(), and sendfile(). |
|
||||||||||||
|
Definition at line 339 of file ftpd.c. References alarm, args, cmd, fclose(), fflush(), fopen(), FTPD_LOG, FTPD_MSG, FtpdVersion, GetNetInfo(), GOOD, INACTIVITY_TIMEOUT, init, localtime(), logfile, logit(), msgfile, now, NULL, printf, readline(), s, SIGALRM, signal(), status, stdout, strcmp, time, time_t, tm::tm_hour, tm::tm_isdst, tm::tm_mday, tm::tm_min, tm::tm_mon, tm::tm_sec, tm::tm_wday, tm::tm_year, and tzname. |
|
|
|
|
||||||||||||
|
Definition at line 309 of file ftpd.c. References fclose(), fgets(), fopen(), msgfile, NULL, printf, and strlen(). |
|
|
Definition at line 278 of file ftpd.c. References printf. |
|
|
Definition at line 63 of file ftpd.c. Referenced by doPASS(). |
|
|
Definition at line 61 of file ftpd.c. Referenced by AreWeIn(), doDELE(), doMKD(), doRMD(), doRNFR(), doRNTO(), and recvfile(). |
|
|
|
|
|
Definition at line 66 of file ftpd.c. Referenced by DataConnect(). |
|
|
Definition at line 67 of file ftpd.c. Referenced by DataConnect(), and TalkTrans(). |
|
|
Definition at line 53 of file ftpd.c. Referenced by doSTAT(), httpdate(), httptime(), main(), Print_Duration(), Print_Uptime(), and september(). |
|
|
|
|
|
Definition at line 60 of file ftpd.c. Referenced by DataConnect(), DOdata(), doPASV(), doPORT(), recvfile(), and sendfile(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 74 of file ftpd.c. Referenced by DataConnect(), doPASV(), get_cmd(), logging(), logit(), main(), outbyte(), recvfile(), and sendfile(). |
|
|
|
|
|
|
|
|
Initial value: {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}
Definition at line 54 of file ftpd.c. Referenced by doSTAT(), httpdate(), and httptime(). |
|
|
|
|
|
Definition at line 69 of file ftpd.c. Referenced by announce(), cgienv(), doSTAT(), GetNetInfo(), and sendreply(). |
|
|
Definition at line 66 of file ftpd.c. Referenced by doSTAT(), and GetNetInfo(). |
|
|
Definition at line 67 of file ftpd.c. Referenced by doSTAT(), and GetNetInfo(). |
|
|
Definition at line 64 of file ftpd.c. Referenced by AreWeIn(), dochroot(), dosrvrroot(), and path(). |
|
|
Definition at line 69 of file ftpd.c. Referenced by cgienv(), GetNetInfo(), main(), and proxy(). |
|
|
Definition at line 66 of file ftpd.c. Referenced by doPASV(), doSTAT(), and GetNetInfo(). |
|
|
Definition at line 67 of file ftpd.c. Referenced by doSTAT(), and GetNetInfo(). |
|
|
|
|
|
Definition at line 76 of file ftpd.c. Referenced by DataConnect(), do_child(), do_select(), get_time(), main(), res_send(), select(), tcp_send_timeout(), and w_other(). |
|
|
|
|
|
Definition at line 62 of file ftpd.c. Referenced by AreWeIn(), doPASS(), doSTAT(), doUSER(), DOuser(), and get_homedir(). |
1.4.6