realpath bug

Mike Frysinger vapier at gentoo.org
Thu Feb 8 21:21:34 PST 2007


On Thursday 08 February 2007, Marc Leeman wrote:
> > could you be more specific as to what is breaking ?  "syslogd breaks on
> > read only filesystems" does not translate well into actual test cases for
> > inclusion into uClibc testsuite ...
>
> cf. busybox discussion of yesterday:
>
> http://www.busybox.net/lists/busybox/2007-February/026252.html

ok, looking again and i see your setup is:
 - /dev is mounted RO
 - /tmp is mounted RW
 - /dev/log is a symlink to ../tmp/log

busybox launches sysklogd which does:
 - dev_log_name = xmalloc_realpath(/dev/log)
 - unlink(dev_log_name)

on your system, dev_log_name should be resolving to /tmp/log but it seems to 
return NULL ... on my system, it works:
# ls -l /dev/log /tmp/log 
lrwxrwxrwx 1 root root 10 2007-02-08 23:58 /dev/log -> ../tmp/log
-rw-r--r-- 1 root root  0 2007-02-08 23:58 /tmp/log
# ./busybox syslogd -n
running xmalloc_realpath(/dev/log)
got back /tmp/log
dev_log_name is now /tmp/log
unlinking(/tmp/log)
exiting now
# ./busybox syslogd -n
running xmalloc_realpath(/dev/log)
got back (null)
dev_log_name is now /dev/log
unlinking(/dev/log)
exiting now

this behavior is correct ... since /tmp/log was removed in the first run, the 
second run should actually return NULL ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://busybox.net/lists/uclibc/attachments/20070209/bcc26b8f/attachment.pgp 


More information about the uClibc mailing list