Closed GoogleCodeExporter closed 9 years ago
Some possible fixes (including ones that I think are awful and/or dangerous):
1. Make ‘test -w’ check whether its argument is a directory, and if it is,
try creating a file in it.
2. Change those scripts to try creating a file in the directory, like
$home/lib/profile does (on line /syscall create/). Maybe delete the file
afterward? ($home/lib/profile doesn't delete the file, but at least the test
still succeeds when the file already exists.)
3. Add a new option to test which tests that (a) its argument is a directory
and (b) the directory allowed creation (then deletion) of at least one file
with a semi-arbitrary name. Change the scripts to use this option.
4. Add an option to test which tests that its argument has at least one mode
bit in common with a specified mask. (Can it know which set of mode bits
(user/group/other) applies to the current process?)
5. Give up on testing directories for writability. Change lp to always mount
its /tmp (is there a security risk from not doing this?); change juke to use
‘test -e /mnt/juke’.
I think option 5 is best, and option 1 is horribly dangerous.
Original comment by rransom....@gmail.com
on 10 Aug 2012 at 7:15
yes, and 5 was exactly what i did to lp :)
Original comment by cinap_le...@felloff.net
on 10 Aug 2012 at 9:03
changed the scripts.
Original comment by cinap_le...@felloff.net
on 9 Sep 2012 at 1:28
Original issue reported on code.google.com by
cinap_le...@felloff.net
on 24 May 2012 at 6:38