Julian informed me that I am wrong.

Setting the correct mode when creating each file or directory can be
impossible because then it would forbid the process from writing into it
and perhaps allow other users to manipulate the tree before the
operation is complete. The files should be created with 0600 and
directories 0700, and then set to the correct mode later.

Julian's mentioned "and then rewalk the target to make them more
permissive inside out", which feels very plausible for directories but I
still believe the files ought to be done with `fchmod` before closing
them.

In any event, the GNU utilities have grown this sort of knowledge over
four or five decades, and if we're going to deviate from the series of
systemcalls they issue we should have an excellent reason for it.

Thanks

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2165041

Title:
  Missing setuid flag in su and sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/rust-coreutils/+bug/2165041/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to