Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!ames!lll-tis!elxsi!beatnix!gww From: gww@beatnix.UUCP (Gary Winiger) Newsgroups: comp.unix.wizards Subject: Re: Strange syslog behavior in ftpd Message-ID: <498@elxsi.UUCP> Date: Fri, 4-Sep-87 14:34:54 EDT Article-I.D.: elxsi.498 Posted: Fri Sep 4 14:34:54 1987 Date-Received: Sat, 5-Sep-87 18:46:13 EDT References: <2872@psuvax1.psu.edu> Sender: nobody@elxsi.UUCP Reply-To: gww@beatnix.UUCP (Gary Winiger) Organization: ELXSI Super Computers, San Jose Lines: 118 Keywords: BSD 4.3, syslog, ftpd In article <2872@psuvax1.psu.edu> ehrlich@psuvax1.psu.edu (Dan Ehrlich) writes: > >The ftpd is being started by inetd. The entry for ftpd in inetd.conf >is: > >ftp stream tcp nowait root /etc/ftpd ftpd -l -d ^^^^ > >Has anyone else seen this problem? Does anyone know why it happens? >Does anyone have a fix? > >Thanks in advance. The problem deals with the use of the -d (debug) flag. The person who translated 4.2 ftpd to 4.3 screwed up the debugging output. I've made the fix locally, but not gotten around to posting to comp.4bsd.bugs. Here's my bug fix: *** /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); } }