Subject: WTMP logging disabling

From: Robin Lunn <[email-masked]>
Date: Mon, 12 Feb 1996 14:32:35 +0200 (GMT)

Currently the ftpd logs connections to wtmp.  For larger sites this may cause
wtmp to grow to extrememly large size.  

Here is a quick patch to disable logging to wtmp.

Patch by: Robin Lunn <[email-masked]>

--- wu-ftpd-2.4.2-beta-9/src/ftpd.c.orig	Tue Jan 23 08:09:11 1996
+++ wu-ftpd-2.4.2-beta-9/src/ftpd.c	Mon Feb 12 11:59:09 1996
@@ -1110,8 +1110,8 @@
 {
 
     (void) seteuid((uid_t) 0);
-    if (logged_in)
-        logwtmp(ttyline, "", "");
+/*    if (logged_in)
+        logwtmp(ttyline, "", ""); */
     pw = NULL;
     logged_in = 0;
     anonymous = 0;
@@ -1320,9 +1320,9 @@
 #endif
     (void) initgroups(pw->pw_name, pw->pw_gid);
 /* WTMP PROCESSING STARTS HERE */
-    /* open wtmp before chroot */
+    /* open wtmp before chroot
     (void) sprintf(ttyline, "ftp%d", getpid());
-    logwtmp(ttyline, pw->pw_name, remotehost);
+    logwtmp(ttyline, pw->pw_name, remotehost); */
     logged_in = 1;
 
     /* if logging is enabled, open logfile before chroot */
@@ -2878,7 +2878,7 @@
 {
     if (logged_in) {
         (void) seteuid((uid_t) 0);
-        logwtmp(ttyline, "", "");
+/*        logwtmp(ttyline, "", ""); */
     }
     if (logging)
 	syslog(LOG_INFO, "FTP session closed");

-- 
_ __                  | Only my ideas here unless I say otherwise...      _
' )  )     /          | (BeamJack@IRC)                                   / \
 /--' ____/___o  __   |                                                 |  /
/  \_(_) /_) (__/) )_ |                                                 \
       "I didn't know it was impossible when I did it!"                  \
                                                                         /\
                                                                        |  |
                                                                         \/