Another reason why - really /tm

acheng at uiucdcs.CS.UIUC.EDU acheng at uiucdcs.CS.UIUC.EDU
Thu Sep 26 01:40:00 AEST 1985


>/* Written  2:50 pm  Sep 20, 1985 by loverso at sunybcs.UUCP in uiucdcs:net.unix-wizar */
>/* ---------- "Re: Another reason why - really /tm" ---------- */
>From: peter at rlgvax.UUCP (Peter Klosky) 16 Sep 85 <764 at rlgvax.UUCP>
>> > For security make your /tmp file 0600 mode.
>> 
>> /tmp is world writeable.  This means that anyone can unlink tmp files. 
>> In particular, my application wants to pass state data from a child
>> process to a parent prodcess via a tmp file that the child creates,
>> and there are windows of vulnerability in this scheme, due to the unlink
>> trouble.
>
>Easy.  have your application make a subdirectory in /tmp, and then place
>a file within that subdir.  As long as your subdirectory is not world
>writeable, you can place tmp files there w/o having a window of vulnerability.
>
>I also changed /etc/rc to clear /tmp with an rm -r
>

The "rm -r" may remove the lost+found directory in /tmp.  That
may cause trouble when fsck needs it.  But then, one may say /tmp
is for scratch and no big deal if files get lost there.  Well...

----------------------------------------------------------------------
Albert Cheng
acheng at UIUC.ARPA	acheng at UIUC.CSNET	{ihnp4,pur-ee}!uiucdcs!acheng
Dept. of Computer Science, Univ. of Illinois-Urbana,
Rm. 240, 1304 W. Springfield, Urbana, IL 61801

%%% The above is the opinion of my own %%%
%%% and not necessarily that of the management. %%%



More information about the Comp.unix.wizards mailing list