Hard links to directories: why not?

2656-Daniel R. Levy00000000000 levy at mtcchi.uucp
Wed Aug 29 07:01:55 AEST 1990


jik at pit-manager.mit.edu (Jonathan I. Kamens) writes:

>  The "correct" solution, perhaps, is to make mv check for special
>files after the rename() fails, and to use the mknod code to recreate
>special files.  The problem with this is that it would require mv to
>be setuid. Perhaps a better solution would be for mv to notice
>special files and print out an error like "cannot rename special files
>across partitions"; that is, after all, what it used to print when you
>tried to mv regular files across partitions (without the word
>"special").

How about requiring the user to have an effective uid of 0?  ("must be root to
move /dev/barf to /usr/tmp/barf") Having "mv" setuid gives me the willies.  Too
much room for a poor implementation to be fooled into doing something that the
normal UNIX protections would otherwise disallow.

>Jonathan Kamens			              USnail:
>MIT Project Athena				11 Ashford Terrace
>jik at Athena.MIT.EDU				Allston, MA  02134
>Office: 617-253-8495			      Home: 617-782-0710
-- 
 * Daniel R. Levy * uunet!tellab5!mtcchi!levy * This is not on behalf of MTC *
So far as I can remember, there is not one    | ... therefore be as shrewd as
word in the Gospels in praise of intelligence.| serpents [see Gen. 3] and harm-
-- Bertrand Russell [Berkeley UNIX fortune]   | less as doves -- JC [Mt. 10:16]



More information about the Comp.unix.wizards mailing list