From owner-freebsd-bugs Fri Oct 31 15:00:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA11273 for bugs-outgoing; Fri, 31 Oct 1997 15:00:03 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA11254; Fri, 31 Oct 1997 15:00:01 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 31 Oct 1997 15:00:01 -0800 (PST) Resent-Message-Id: <199710312300.PAA11254@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, jim@komodo.reptiles.org Received: from komodo.reptiles.org (komodo.reptiles.org [198.96.117.142]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA11106 for ; Fri, 31 Oct 1997 14:56:19 -0800 (PST) (envelope-from jim@komodo.reptiles.org) Received: from localhost (1568 bytes) by komodo.reptiles.org via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) (ident using unix) id for ; Fri, 31 Oct 1997 17:54:15 -0500 (EST) (Smail-3.2.0.98 1997-Oct-16 #1 built 1997-Oct-21) Message-Id: Date: Fri, 31 Oct 1997 17:54:15 -0500 (EST) From: jim@komodo.reptiles.org Reply-To: jim@komodo.reptiles.org To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/4910: tftpd does not log when chroot is enabled Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4910 >Category: bin >Synopsis: tftpd does not log when chroot is enabled >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 31 15:00:00 PST 1997 >Last-Modified: >Originator: Jim Mercer >Organization: Reptilian Research >Release: FreeBSD 2.2.5-RELEASE i386 >Environment: FreeBSD komodo.reptiles.org 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Wed Oct 22 17:30:35 EDT 1997 root@komodo.reptiles.org:/usr/src/sys/compile/KOMODO i386 >Description: openlog() needs to have LOG_NDELAY added, or else the syslog() calls after the chroot will not get sent to syslogd. >How-To-Repeat: in /etc/inetd.conf: logging, no chroot, works fine: tftp dgram udp wait nobody /usr/libexec/tftpd tftpd -l logging, with chroot, no logging after chroot tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot >Fix: *** tftpd.c Fri Oct 31 15:38:27 1997 --- tftpd.c.old Fri Oct 31 14:54:44 1997 *************** *** 120,126 **** char *chroot_dir = NULL; struct passwd *nobody; ! openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP); while ((ch = getopt(argc, argv, "lns:")) != EOF) { switch (ch) { case 'l': --- 120,126 ---- char *chroot_dir = NULL; struct passwd *nobody; ! openlog("tftpd", LOG_PID, LOG_FTP); while ((ch = getopt(argc, argv, "lns:")) != EOF) { switch (ch) { case 'l': >Audit-Trail: >Unformatted: