Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!sri-spam!mordor!lll-tis!elxsi!marduk!gww From: gww@marduk.UUCP (Gary Winiger) Newsgroups: comp.bugs.4bsd Subject: ftpd in debug mode doesn't log +Fix Message-ID: <531@elxsi.UUCP> Date: Fri, 4-Sep-87 19:25:06 EDT Article-I.D.: elxsi.531 Posted: Fri Sep 4 19:25:06 1987 Date-Received: Sat, 5-Sep-87 21:37:46 EDT Sender: nobody@elxsi.UUCP Reply-To: gww@marduk.UUCP (Gary Winiger) Organization: ELXSI Super Computers, San Jose Lines: 113 Subject: ftpd in debug mode doesn't log +Fix Index: etc/ftpd/ftpd.c 4.3BSD +Fix Description: When ftpd was translated from 4.2 to 4.3, the calls to syslog for outputting debugging information were incorrectly translated. Repeat-By: Run the ftp daemon (ftpd) in debugging mode and not the lack of logged messages. Fix: Correct the calls to syslog. The attached code solves this problem at Elxsi. Gary.. {ucbvax!sun,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww --------- cut --------- snip --------- :.,$w diff ------------- *** /tmp/,RCSt1000591 Fri Jul 31 12:13:35 1987 --- ftpd.c Fri Jul 31 12:12:48 1987 *************** *** 1,5 **** --- 1,9 ---- /* * $Log: ftpd.c,v $ + * Revision 1.3 87/07/31 12:10:39 gww + * Have debugging output through syslog work. + * Syslog(3) supports a maximum of 5 variables for the string NOT varargs! + * *************** *** 20,26 **** #endif not lint #ifndef lint ! static char *ERcsId = "$Header: ftpd.c,v 1.2 87/07/31 11:56:22 gww Exp $ ENIX BSD"; static char sccsid[] = "@(#)ftpd.c 5.7 (Berkeley) 5/28/86"; #endif not lint --- 24,30 ---- #endif not lint #ifndef lint ! static char *ERcsId = "$Header: ftpd.c,v 1.3 87/07/31 12:10:39 gww Exp $ ENIX BSD"; static char sccsid[] = "@(#)ftpd.c 5.7 (Berkeley) 5/28/86"; #endif not lint *************** *** 605,638 **** dologout(0); } ! /*VARARGS2*/ ! reply(n, s, args) int n; char *s; { printf("%d ", n); ! _doprnt(s, &args, stdout); printf("\r\n"); (void) fflush(stdout); if (debug) { syslog(LOG_DEBUG, "<--- %d ", n); ! syslog(LOG_DEBUG, s, &args); } } ! /*VARARGS2*/ ! lreply(n, s, args) int n; char *s; { printf("%d-", n); ! _doprnt(s, &args, stdout); printf("\r\n"); (void) fflush(stdout); if (debug) { syslog(LOG_DEBUG, "<--- %d- ", n); ! syslog(LOG_DEBUG, s, &args); } } --- 609,640 ---- dologout(0); } ! reply(n, s, p0, p1, p2, p3, p4) int n; char *s; { printf("%d ", n); ! printf(s, p0, p1, p2, p3, p4); printf("\r\n"); (void) fflush(stdout); if (debug) { syslog(LOG_DEBUG, "<--- %d ", n); ! syslog(LOG_DEBUG, s, p0, p1, p2, p3, p4); } } ! lreply(n, s, p0, p1, p2, p3, p4) int n; char *s; { printf("%d-", n); ! printf(s, p0, p1, p2, p3, p4); printf("\r\n"); (void) fflush(stdout); if (debug) { syslog(LOG_DEBUG, "<--- %d- ", n); ! syslog(LOG_DEBUG, s, p0, p1, p2, p3, p4); } }