Re: Odd root (and suid root) behavior

Marek Michalkiewicz (marekm@i17linuxb.ists.pwr.wroc.pl)
Thu, 16 May 1996 00:39:09 +0200 (MET DST)


> [linux-kernel cc: snipped, this is getting a bit off-topic :)]

Not sure if it was a good move, it could be a kernel problem too...
(there were some problems with unix domain sockets in the past)
Added the syslogd maintainer to the cc: list too, just in case it's
a problem with syslogd.

> Have you tried a strace on syslogd during the delay? Since it's at bootup
> you'll probably need to strace it right from the start.

It's somewhat tricky - have to become root first :). Instead, tried this:
right after booting the system log in as ordinary user, then as root on
another VC (it hangs after "Last login"), then do (as ordinary user):

strace logger xxx

and it does the following:

...
close(1) = 0
ipc_subcall(0x1, 0x1, 0, 0x4007791d) = 1
ipc_subcall(0x1, 0x4009b2f0, 0xa, 0x40077977) = 0 <-- hangs here!
time([832198145]) = 832198145
open("/usr/lib/zoneinfo/localtime", O_RDONLY) = 3
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 6460) = 969
close(3) = 0
time(NULL) = 832198145
write(1, "<13>May 16 00:09:05 marekm: xxx\0"..., 32) = 32
_exit(0) = ?

Next time I run it, it does exactly the same system calls but doesn't
hang. Since fd 1 is closed, I assume that the first ipc_subcall (??)
returns the file descriptor which is later used to write the message.
The moment it continues to run, the root login on another VC will
complete too.

The system is Debian 1.1 beta (99% ELF), kernel 1.99.4, libc5-5.2.18-6,
strace-3.0-4, syslogd-1.3-2. I can supply further details on request.

Regards,

Marek