tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Daniel.Clar () supelec ! fr (Daniel Clar)
To: tru64-unix-managers
Subject: Problem with syslog after chroot and chdir
Date: Tue, 02 Jan 1996 12:54:21 +0000	[thread overview]
Message-ID: <96076327921029.tru64-unix-managers.marc@archive.invalid> (raw)

Hello,

It seems to me that there is some bug in Digital Unix 3.2c when using some 
system calls.

I'm currently using WU FTPD and I was surprised not to see some messages in the
daemon.log file.

In fact all the messages are in it just before the following sequence :

    if (anonymous || guest) {
        /* We MUST do a chdir() after the chroot. Otherwise the old current
         * directory will be accessible as "." outside the new root! */
        if (anonymous) {
/* the following line is added by me */
            syslog(LOG_INFO,"PW->PW_DIR %s", pw->pw_dir);
            if (chroot(pw->pw_dir) < 0 || chdir("/") < 0) {
                reply(550, "Can't set guest privileges.");
                goto bad;
            }
/* the following two lines are added by me */
        reply(220, "after chroot and chdir.");
        syslog(LOG_INFO,"AFTER CHDIR ANONYMOUS %d GUEST %d", anonymous, guest);


So what happens ?

The first syslog works correctly and the PW->PW_DIR message is sent in the 
daemon.log file. But, if the "after chroot and chdir." is correctly sent to the 
user, the "AFTER CHDIR ANONYMOUS" is absolutely not sent to the daemon.log file.

When the chdir,chroot is not executed, for an identified user, there is 
absolutely no problem. 

So for me the syslog doesn't work any more after the chroot,chdir.

Bug (or feature) ?

Daniel


o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o
|   Daniel Clar          	    	   e-mail : Daniel.Clar@supelec.fr  |
|   Computer Operations Manager			  : dc@supelec.fr	    |
|   Service Informatique Supelec                    and                     |
|   Plateau de Moulon                     DECUSF::CLAR_D or clar_d@decus.fr |
|   91192 Gif sur Yvette Cedex - France                                     |
|   Tel : (33 1) 69 85 14 87        	   Fax : (33 1) 69 85 12 34         |
o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o

                 reply	other threads:[~1996-01-02 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox