Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!clarkson!grape.ecs.clarkson.edu!klehr From: klehr@sun.soe.clarkson.edu (Thomas J. Klehr) Newsgroups: comp.os.minix Subject: Sticky Directories in Minix Message-ID: Date: 14 Dec 90 18:16:54 GMT Sender: @grape.ecs.clarkson.edu Reply-To: klehr@sun.soe.clarkson.edu (Thomas J. Klehr) Distribution: comp Organization: Clarkson University, Potsdam NY Lines: 47 The following are patches to src/fs/link.c, that allow sticky directories. For those who aren't familiar with them, sticky directories restrict who may delete/rename a file in the directory. Only the owner of the file or the owner of the directory can delete/rename files in my implementation, as long as they have write-permission on the directory. root can also, of course. The definition of ALL_MODES in /usr/include/minix/const.h should be changed from 06777 to 07777 also. Sticky directories aren't really necessary for a single-user system, but sometimes they're a nice feature, as in /tmp, /usr/spool/mail, /usr/spool/at, or any other directory that you wish to leave world-writable, and yet keep some protection over what other users can delete. These directories can help limit the number of set-uid root files needed; `mail' and `at' no longer need to be set-uid root, since anyone can write to these directories, and nobody can delete anyone else's files. Tom (klehr@sun.soe.clarkson.edu) ------------------------------------------------------ begin 600 link.c.cdif M*BHJ(&9S+C$U,3 O;&EN:RYC"49R:2!.;W8@,S @,C$Z,S4Z-#8@,3DY, HM M+2T@;&EN:RYC"0E&