[syslinux] tftpd-hpa can't reopen /dev/log

Ferenc Wagner wferi at niif.hu
Fri Mar 20 10:55:40 PDT 2009


Hi,

here is an example of tftpd-hpa running in daemon mode failing to
reopen /dev/log.  No wonder, as it tries after chrooting.

Cheers,
Feri.

$ sudo strace -f -p 2356
Process 2356 attached - interrupt to quit
select(5, [4], NULL, NULL, NULL)        = 1 (in [4])
setsockopt(4, SOL_IP, IP_PKTINFO, [1], 4) = 0
recvmsg(4, {msg_name(16)={sa_family=AF_INET, sin_port=htons(57109), sin_addr=inet_addr("169.254.1.4")}, msg_iov(1)=[{"\0\1dal\0octet\0tsize\0000\0blksize\0001408\0"..., 65468}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_IP, cmsg_type=, ...}, msg_flags=0}, 0) = 33
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("169.254.1.1")}, 16) = 0
getsockname(5, {sa_family=AF_INET, sin_port=htons(58102), sin_addr=inet_addr("169.254.1.1")}, [16]) = 0
close(5)                                = 0
clone(Process 24082 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7da56f8) = 24082
[pid  2356] select(5, [4], NULL, NULL, NULL <unfinished ...>
[pid 24082] rt_sigaction(SIGHUP, {SIG_IGN}, NULL, 8) = 0
[pid 24082] open("/etc/hosts.allow", O_RDONLY) = 5
[pid 24082] fstat64(5, {st_mode=S_IFREG|0644, st_size=579, ...}) = 0
[pid 24082] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f25000
[pid 24082] read(5, "# /etc/hosts.allow: list of hosts"..., 4096) = 579
[pid 24082] read(5, ""..., 4096)        = 0
[pid 24082] close(5)                    = 0
[pid 24082] munmap(0xb7f25000, 4096)    = 0
[pid 24082] open("/etc/hosts.deny", O_RDONLY) = 5
[pid 24082] fstat64(5, {st_mode=S_IFREG|0644, st_size=878, ...}) = 0
[pid 24082] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f25000
[pid 24082] read(5, "# /etc/hosts.deny: list of hosts "..., 4096) = 878
[pid 24082] read(5, ""..., 4096)        = 0
[pid 24082] close(5)                    = 0
[pid 24082] munmap(0xb7f25000, 4096)    = 0
[pid 24082] close(4)                    = 0
[pid 24082] socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
[pid 24082] open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 5
[pid 24082] read(5, "65536\n"..., 31)   = 6
[pid 24082] close(5)                    = 0
[pid 24082] socket(PF_FILE, SOCK_STREAM, 0) = 5
[pid 24082] fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
[pid 24082] connect(5, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = 0
[pid 24082] send(5, "\2\0\0\0\f\0\0\0\6\0\0\0group\0"..., 18, MSG_NOSIGNAL) = 18
[pid 24082] poll([{fd=5, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=5, revents=POLLIN|POLLHUP}])
[pid 24082] recvmsg(5, {msg_name(0)=NULL, msg_iov(2)=[{"group\0"..., 6}, {"\270O\3\0\0\0\0\0"..., 8}], msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {6}}, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 14
[pid 24082] mmap2(NULL, 217016, PROT_READ, MAP_SHARED, 6, 0) = 0xb7d3b000
[pid 24082] close(6)                    = 0
[pid 24082] close(5)                    = 0
[pid 24082] setgroups32(1, [65534])     = 0
[pid 24082] chroot(".")                 = 0
[pid 24082] setregid32(65534, 65534)    = 0
[pid 24082] setreuid32(65534, 65534)    = 0
[pid 24082] bind(4, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("169.254.1.1")}, 16) = 0
[pid 24082] connect(4, {sa_family=AF_INET, sin_port=htons(57109), sin_addr=inet_addr("169.254.1.4")}, 16) = 0
[pid 24082] setsockopt(0, SOL_IP, IP_MTU_DISCOVER, [0], 4) = -1 ENOTSOCK (Socket operation on non-socket)
[pid 24082] time(NULL)                  = 1237569275
[pid 24082] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 24082] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 24082] send(3, "<29>Mar 20 17:14:35 in.tftpd[2408"..., 71, MSG_NOSIGNAL) = -1 ENOTCONN (Transport endpoint is not connected)
[pid 24082] close(3)                    = 0
[pid 24082] socket(PF_FILE, SOCK_DGRAM, 0) = 3
[pid 24082] fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
[pid 24082] connect(3, {sa_family=AF_FILE, path="/dev/log"...}, 110) = -1 ENOENT (No such file or directory)
[pid 24082] close(3)                    = 0
[pid 24082] open("dal", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
[pid 24082] time(NULL)                  = 1237569275
[pid 24082] open("/etc/localtime", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 24082] socket(PF_FILE, SOCK_DGRAM, 0) = 3
[pid 24082] fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
[pid 24082] connect(3, {sa_family=AF_FILE, path="/dev/log"...}, 110) = -1 ENOENT (No such file or directory)
[pid 24082] close(3)                    = 0
[pid 24082] send(4, "\0\5\0\1File not found\0"..., 19, 0) = 19
[pid 24082] exit_group(0)               = ?
Process 24082 detached




More information about the Syslinux mailing list