W dniu 14.09.2014 o 05:04, Rob Landley pisze:
On 09/11/14 13:55, [email protected] wrote:
I found some bug at the rm toy. The rm toy can't remove link to
non-existent file with the -f option. Patch fixes this bug:
https://github.com/luckboy/toyroot/blob/master/patch/toybox-0.4.9-fixed-rm-bug.patch
Thanks. I checked in a fix, does this work for you?
http://landley.net/hg/toybox/rev/b748127e092e
Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net
I didn't check in this fix but I think that replacement of access() is
bad idea.
The unlink function can remove directory in some systems for superuser.
It will be better if these check whether the file isn't symbolic link.
If this file is symbolic
link, these remove this symbolic link (no reference), otherwise these
invoke the dirtree_read function.
On the other hand, why did you check use the access function at the
rm_main function?
Is it related to race at the rm toy? If you must use access(), you can
use my patch or check whether the file is symbolic link after access().
Ćukasz Szpakowski.
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net