delete permissive (Re: Nasty Security Hole?)

The Grey Wolf greywolf at unisoft.UUCP
Tue Nov 29 09:31:55 AEST 1988


In article <8974 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>>>In article <8927 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>>>>What in the world would it MEAN?  It is the DIRECTORY that is modified
>>>>by an unlink, not the inode.  Would a "delete" bit then mean that no
>>>>links to the inode could be removed?  Think about the consequences for
>>>>a bit.  It would be horrible!
>
>Well, I should have known that people wouldn't think about it just
>because I asked them to.
>
>I stand by my comments.  Would it help if I offered a prize to the
>first person (other than at Bell Labs) to explain what problem such
>a feature would cause?

For starters, there is the compatibility issue - the delete bit would
invariably take some other bit in the mode word that is already in use
(I don't think we have enough bits left in the mode word for three more
 flag bits; as I am not looking at <sys/inode.h> right now, I can't be
 sure).  Said file structure would look pretttttty damned munged to some
other machine's concept of the same thing.

Secondly, it IS a property of the directory and not the file.  This
is part of the reason that directories have such things as write per-
mission:  if you could delete a file, why would you not have the right
to CREATE a file...?  That would not make very much sense to the average
user (besides which, if you REALLY wanted to do that, you could always
enforce quotas...:-) :-)).  Besides which, this wouldn't really cure the
rm problem.

(aside:  looking at the original topic concerning problems with "rm",
it is my deduction and opinion that if anyone can find a way to handle
it on their own (same with >, >>, dd and mv), do so.  That is the beauty
of the UNIX system - there is always more than one way to do something.
It is not, however, their prerogative to impinge on others to do the
same thing they are doing ("My way is better than your way" is an opinion
and subject to change, opinion and being ignored).)

>
>P.P.S.  Am I really the only person who USES multiple links?

Emphatically, NO!  I use them all the time - it saves me space in some
of my bundled programs!

Interesting note:  D'jever notice that, in a sticky directory (void
where prohibited :-)) you can make a hard link from one file to another,
but if someone else owns that file, you can't remove the link you created?
This seems rather strange to me, but, given the semantics of the sticky bit
at this time, it follows its description to the letter.

So how'd I do...?

...TheysaidDoyouseethebiggreenglowinthedarkhouseuponthehill?andIsaidYesIseethebiggreenglowinthedarkhouseuponthehillTheresabigdarkforestbetweenmeandthebiggreenglowinthedarkhouseuponthehillandalittleoldladyonaHoovervacuumcleanersayingIllgetyoumyprettyandyourlittledogTototoo
I don't even *HAVE* a dog Toto...
(...!{sun,ucbvax,pixar,uunet,well}!unisoft!greywolf)
...greywolf at unisoft.uu.net
-- 
...TheysaidDoyouseethebiggreenglowinthedarkhouseuponthehill?andIsaidYesIseethebiggreenglowinthedarkhouseuponthehillTheresabigdarkforestbetweenmeandthebiggreenglowinthedarkhouseuponthehillandalittleoldladyonaHoovervacuumcleanersayingIllgetyoumyprettyandyourlittledogTototoo
I don't even *HAVE* a dog Toto...



More information about the Comp.unix.wizards mailing list