[dev] [sbase] S_ISVTX?

From: Markus Wichmann <nullplan_AT_gmx.net>
Date: Fri, 18 Oct 2013 23:49:07 +0200

Hi all,

on an unrelated note: mkdir's mode argument is read in as a decimal
number and applied directly to chmod. Are you sure we want that?
Especially with chmod's and ls' use of the symbolic constants?

Also on an unrelated note: Are there really systems out there that don't
define those symbolic mode bits to the usual definitions?

Now my question: Does someone here have a personal vendetta against
S_ISVTX? I ask, because chmod will silently drop tries to set it via
number and will error on trying to set it via symbol. The commit history
for chmod shows that one commit after the initial one removed that flag,
but not why that was done, and the mailing list archive from around that
time for that author are not helpful, either.

Also ls refuses to display the sticky bit even if it is set.

Really, code to handle that is not that big (it's three lines for chmod
and one line for ls) and as it stands, it's a security risk for me
(because I certainly don't expect /tmp to have mode 0777 after I typed
in 'chmod 1777 /tmp'. Yes, I know /tmp sucks balls through a straw, but
the fact is that programs are using /tmp and I don't want to repair
every single one I come across.) Also, it takes three preprocessor
directives to make the change transparent to systems that don't offer
the S_ISVTX bit.

So, is there a reason for this particular omission?

Ciao,
Markus
Received on Fri Oct 18 2013 - 23:49:07 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 19 2013 - 00:00:11 CEST