1

sudoedit does not allow editing files when the original user has write access to one of the parent directories (as explained here). However, I'm noticing that sudoedit does not seem to take into account the sticky bit when performing this check.

For example, I have /tmp with mode 1777 owned by root:root, and /tmp/foo also owned by root:root. Since /tmp has the sticky bit set, I think I should be able to use sudoedit on /tmp/foo, but I can't:

$ sudoedit /tmp/foo
sudoedit: /tmp/foo: editing files in a writable directory is not permitted

Shouldn't sudoedit be able to notice the sticky bit and not consider /tmp to be writable for the purposes of this check? Or would doing so introduce some security issue I'm not aware of?

0 Answers0