diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-07 03:27:55 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-07 03:27:55 +0000 |
commit | 49ac8a332f4d8a7701ebc899f103d5b92320e90f (patch) | |
tree | ff37baaeba6817f0abf0d9346fa7f6c070e13de6 /libexec/ftpd | |
parent | 8b70c05ce79ed438f3805d6bbaf7eacdd0da6e1d (diff) |
STATS is not an option.
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/Makefile | 4 | ||||
-rw-r--r-- | libexec/ftpd/ftpd.c | 26 |
2 files changed, 3 insertions, 27 deletions
diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile index c56268b7873..1b12d02eea4 100644 --- a/libexec/ftpd/Makefile +++ b/libexec/ftpd/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.6 1996/07/28 22:42:44 downsj Exp $ +# $OpenBSD: Makefile,v 1.7 1996/08/07 03:27:53 downsj Exp $ # $NetBSD: Makefile,v 1.13 1996/02/16 02:07:41 cgd Exp $ # @(#)Makefile 8.2 (Berkeley) 4/4/94 PROG= ftpd -CFLAGS+=-DHASSETPROCTITLE -DSTATS -Dunix +CFLAGS+=-DHASSETPROCTITLE -Dunix SRCS= ftpd.c ftpcmd.c logutmp.c logwtmp.c popen.c MAN= ftpd.8 CLEANFILES+=ftpcmd.c y.tab.h diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 2d4bd93f949..87993500249 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.11 1996/08/07 03:17:58 downsj Exp $ */ +/* $OpenBSD: ftpd.c,v 1.12 1996/08/07 03:27:54 downsj Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -119,10 +119,8 @@ int maxtimeout = 7200;/* don't allow idle time to be set beyond 2 hours */ int logging; int high_data_ports = 0; int guest; -#ifdef STATS int stats; int statfd = -1; -#endif int dochroot; int type; int form; @@ -151,9 +149,7 @@ int notickets = 1; char *krbtkfile_env = NULL; #endif -#ifdef STATS char *ident = NULL; -#endif /* @@ -207,9 +203,7 @@ static struct passwd * static char *sgetsave __P((char *)); static void reapchild __P((int)); -#ifdef STATS void logxfer __P((char *, off_t, time_t)); -#endif static char * curdir() @@ -233,11 +227,7 @@ main(argc, argv, envp) int addrlen, ch, on = 1, tos; char *cp, line[LINE_MAX]; FILE *fd; -#ifdef STATS char *argstr = "dDhlSt:T:u:Uv"; -#else - char *argstr = "dDhlt:T:u:Uv"; -#endif tzset(); /* in case no timezone database in ~ftp */ @@ -262,11 +252,9 @@ main(argc, argv, envp) logging++; /* > 1 == extra logging */ break; -#ifdef STATS case 'S': stats = 1; break; -#endif case 't': timeout = atoi(optarg); @@ -727,12 +715,10 @@ skip: login(&utmp); } -#ifdef STATS /* open stats file before chroot */ if (guest && (stats == 1) && (statfd < 0)) if ((statfd = open(_PATH_FTPDSTATFILE, O_WRONLY|O_APPEND)) < 0) stats = 0; -#endif logged_in = 1; @@ -787,13 +773,11 @@ skip: (void) fclose(fd); } if (guest) { -#ifdef STATS if (ident != NULL) free(ident); ident = strdup(passwd); if (ident == (char *)NULL) fatal("Ran out of memory."); -#endif reply(230, "Guest login ok, access restrictions apply."); #ifdef HASSETPROCTITLE snprintf(proctitle, sizeof(proctitle), @@ -830,9 +814,7 @@ retrieve(cmd, name) FILE *fin, *dout; struct stat st; int (*closefunc) __P((FILE *)); -#ifdef STATS time_t start; -#endif if (cmd == 0) { fin = fopen(name, "r"), closefunc = fclose; @@ -883,15 +865,11 @@ retrieve(cmd, name) dout = dataconn(name, st.st_size, "w"); if (dout == NULL) goto done; -#ifdef STATS time(&start); -#endif send_data(fin, dout, st.st_blksize, st.st_size, (restart_point == 0 && cmd == 0 && S_ISREG(st.st_mode))); -#ifdef STATS if ((cmd == 0) && guest && stats) logxfer(name, st.st_size, start); -#endif (void) fclose(dout); data = -1; pdata = -1; @@ -1927,7 +1905,6 @@ reapchild(signo) while (wait3(NULL, WNOHANG, NULL) > 0); } -#ifdef STATS void logxfer(name, size, start) char *name; @@ -1946,4 +1923,3 @@ logxfer(name, size, start) write(statfd, buf, strlen(buf)); } } -#endif |