Subject: Virtual Domain FTPD: Extra Patches

From: "Marc G. Fournier" <[email-masked]>
Date: Tue, 6 Feb 1996 18:45:31 -0500 (EST)

Hi...

	I'm currently using the virtual domain patches for ftpd, and
found one major thing lacking in it, which is the ability to create 
seperate transfer logs per domain...so I added it :)

	They require the original patches for virtual domains first, as
I didn't start this from scratch, only extended the previous work.

	I also made the ftpaccess entries a little less strict:

virtual 205.150.102.100 root    /home/users/planplus/ftp-serv 
virtual 205.150.102.100 banner  /home/users/planplus/ftp-serv/banner.msg
virtual 205.150.102.100 logfile /home/users/planplus/stats/xferlog
virtual 205.150.102.101 root    /home/users/ken/ftp-serv 
virtual 205.150.102.101 banner  /home/users/ken/ftp-serv/banner.msg

	And, if this is recreating someone else's work...can someone tell
me if there is a mailing list for ftpd that I can follow developments
on?

Thanks...

------[ CUT HERE ]------

*** ftpd.c.orig	Tue Feb  6 18:00:32 1996
--- ftpd.c	Tue Feb  6 18:34:40 1996
***************
*** 156,161 ****
--- 156,162 ----
  struct sockaddr_in *virtual_ptr;
  char virtual_root[MAXPATHLEN];
  char virtual_banner[MAXPATHLEN];
+ char virtual_logfile[MAXPATHLEN];
  #endif
  
  int data;
***************
*** 537,549 ****
        entry = (struct aclmember *) NULL;
        while (!set && getaclentry("virtual", &entry)) {
         if (!strcmp(ARG0, inet_ntoa(virtual_ptr->sin_addr))) {
!          if (ARG1 != NULL && ARG2 != NULL) {
!            virtual_mode = 1;
!            strncpy(virtual_root, ARG1, MAXPATHLEN);
!            strncpy(virtual_banner, ARG2, MAXPATHLEN);
!            syslog(LOG_ERR, "VirtualFTP Connect to: %s",
                    inet_ntoa(virtual_ptr->sin_addr));
           }
         }
        }
      }
--- 538,553 ----
        entry = (struct aclmember *) NULL;
        while (!set && getaclentry("virtual", &entry)) {
         if (!strcmp(ARG0, inet_ntoa(virtual_ptr->sin_addr))) {
!          if(!strcmp(ARG1, "root")) {
!            syslog(LOG_NOTICE, "VirtualFTP Connect to: %s",
                    inet_ntoa(virtual_ptr->sin_addr));
+            virtual_mode = 1;
+            strncpy(virtual_root, ARG2, MAXPATHLEN);
           }
+          if(!strcmp(ARG1, "banner")) 
+            strncpy(virtual_banner, ARG2, MAXPATHLEN);
+          if(!strcmp(ARG1, "logfile")) 
+            strncpy(virtual_logfile, ARG2, MAXPATHLEN);
         }
        }
      }
***************
*** 1171,1177 ****
--- 1175,1185 ----
  
      /* if logging is enabled, open logfile before chroot */
      if (log_outbound_xfers || log_incoming_xfers)
+ #ifdef VIRTUAL
+         xferlog = open(virtual_logfile, O_WRONLY | O_APPEND | O_CREAT, 0660);
+ #else
          xferlog = open(_PATH_XFERLOG, O_WRONLY | O_APPEND | O_CREAT, 0660);
+ #endif
  
      expand_id();
  
------[ CUT HERE ]------

Marc G. Fournier | POP Mail  Telnet Acct  DNS Hosting
System           |  WWW Services   Database Services  | Knowledge, 
  Administrator  |                                    | Information and
 [email-masked]  |      WWW: http://www.ki.net        | Communications, Inc

---

From: [email-masked] (Mark W. de Raad)
Date: Wed, 7 Feb 1996 12:18:43 +1030 (CST)

You (Marc G. Fournier) wrote.......
> I didn't start this from scratch, only extended the previous work.

I cannot find the original patches anywhere... Is it possible that you mail
them to me?

Mark