start-stop-daemon broke on linus tree

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Wed Apr 16 22:47:12 UTC 2008


> -----Original Message-----
> From: Denys Vlasenko [mailto:vda.linux at googlemail.com]
> Sent: den 16 april 2008 20:47
> To: busybox at busybox.net; joakim.tjernlund at transmode.se
> Subject: Re: start-stop-daemon broke on linus tree
> 
> On Wednesday 16 April 2008 19:56, Joakim Tjernlund wrote:
> > Just sent this to the kernel list, figured you might want a copy too,
> > see last in this mail. One more note, stracing
> >  strace -s 120 start-stop-daemon --stop --exec /opt/appl/cuappl02a-r11a-080416jt2/sbin/dropbear
> > shows alot of
> >  readlink("/proc/371/exe", "/opt/appl/cuappl02a-r11a-080416jt2/bin/eq_monolit", 49) = 49
> >  readlink("/proc/373/exe", "/opt/appl/cuappl02a-r11a-080416jt2/bin/eq_monolit", 49) = 49
> >  readlink("/proc/375/exe", "/opt/appl/cuappl02a-r11a-080416jt2/bin/eq_monolit", 49) = 49
> >  readlink("/proc/411/exe", "/opt/appl/cuappl02a-r11a-080416jt2/bin/dropbearmu", 49) = 49
> >
> > 49 bytes seems a little short, we have longer path names than 49 bytes.
> 
> Not really. strlen("/opt/appl/cuappl02a-r11a-080416jt2/sbin/dropbear") = 48.
> We can safely read 48+1 byte only if we only want to know whether it is
> equal to that or not:

I also noticed that readlink("/proc/411/exe",..) returns the real file name so
the start-stop-daemon command above won't work when 
/opt/appl/cuappl02a-r11a-080416jt2/sbin/dropbear is a symlink pointing to
/opt/appl/cuappl02a-r11a-080416jt2/sbin/dropbearmulti

 Jocke




More information about the busybox mailing list