[PATCH] start-stop-daemon: make --exec follow symlinks.
Joakim Tjernlund
Joakim.Tjernlund at transmode.se
Sat Apr 19 22:16:55 UTC 2008
> -----Original Message-----
> From: Denys Vlasenko [mailto:vda.linux at googlemail.com]
> Sent: den 19 april 2008 23:30
> To: Joakim Tjernlund
> Cc: busybox at busybox.net
> Subject: Re: [PATCH] start-stop-daemon: make --exec follow symlinks.
>
> On Saturday 19 April 2008 22:45, Joakim Tjernlund wrote:
> > > Let me know if you see more problems, or have cleanups.
> >
> > I do, you haven't applied the patch to pid_is_cmd(). That
> > part is still buggy(as I explained earlier), even in current svn.
>
> Now xmalloc_open_read_close will return NULL if open fails,
> and this fixes the bug.
Nope, read what I wrote:
"hmm, xmalloc_open_read_close do use xopen though, but even if
this was fixed, it can die. The other users expects this too.
It does not make sense to fail open/lseek/read and return
a ptr with garbage in it. If you make sizep mandatory, it might make
sense if you do *sizep =-1 in case of error."
You cannot die due to I/O errors, nor return a NULL to
start-stop-daemon. The function name itself implies this
but doesn't do so.
> There is also xmalloc_xopen_read_close now and it is used
> where we want to die if open fails (in other applets,
> not start_stop_daemon).
> --
> vda
More information about the busybox
mailing list