[7769] in Kerberos

home help back first fref pref prev next nref lref last post

kerberized ftpd syslog failures

daemon@ATHENA.MIT.EDU (Wolfgang Rupprecht)
Wed Aug 14 16:29:58 1996

To: kerberos@MIT.EDU
Date: 14 Aug 1996 12:15:36 -0700
From: wolfgang@wsrcc.com (Wolfgang Rupprecht)

This is on a sparc5, SunOS 4.1.4, gcc 2.7.2 

The ftpd distributed with kerberos 5.b6 has an interesting problem
with repect to syslog-ing.  It stops as soon as one does a chroot.
This tends to make logging of anon ftp connections somewhat
problematic.

Just to make things more intersting, wu-ftpd-2.4 has essentially the
same code with respect to syslog and chroot, and it runs and logs
fine!

In essence in ftpd.c the first syslog "Before chroot" prints and the 
second one doesn't.

		if (logging)
		    syslog(LOG_INFO, "Before chroot");

		if (chroot(pw->pw_dir) < 0 || chdir("/") < 0) {
			reply(550, "Can't set guest privileges.");
			syslog(LOG_INFO, "After chroot - going bad");
			goto bad;
		}
		if (logging)
		    syslog(LOG_INFO, "After chroot");

At first I thought it was a syslog socket problem, but both ftp
daemons open the log via openlog early in main() long before the
chroot.  What differences could I be overlooking???  Anyone have any
hints?

-wolfgang
-- 
Wolfgang Rupprecht    <wolfgang@wsrcc.com>     <http://www.wsrcc.com/> 
PGP key available via finger, keyservers, and WWW

home help back first fref pref prev next nref lref last post