Re: [Linuxcommand-discuss] more change
Brought to you by:
bshotts
|
From: root <ro...@te...> - 2000-06-19 10:11:41
|
even better :) ø(ju...@ge...)--------ooOo---oOoo-----------------------------ø | Systems Administrator . technolust.cx irc.spamnet.org 6667 | | http://www.technolust.cx/~jura http://www.spamnet.org | | | | Geek Pit Labs http://www.geekpitlabs.com AIM: geekpitlabs | | Geek Admins dot org http://www.geekadmins.org | °----------------------------------------------------------------------° For-pay Internet distributed processing. http://www.ProcessTree.com/?sponsor=31381 On Mon, 19 Jun 2000, Tomi Ollila wrote: > Sunday Jun 18 14:08:41 -0400 2000 root <ro...@te...> wrote: > > > > blah... slow day at work today... sorry for all the spam :) > > > > a fix for the security issue brought up with 'new_script' in regards to > > the tmp file race conditions that exist... > > > > if a temp file is needed... > > > > function temp_dir > > { > > ##### > > # create a secure temp file thus avoiding > > # race conditions that may exist on a multi- > > # user system > > ##### > > > > TEMP=`ls | grep tteemmpp | awk {'print $1'}` > > if [ "$TEMP" != "" ]; then > > mkdir ~/tteemmpp/ > > fi > > } > > > > then, for the TEMP_FILE variable, set it as such: > > ~/tteemmpp/$PROGNAME > > How about: > > TEMPDIR=~/tteemmpp/; [ ! -d $TEMPDIR ] && mkdir $TEMPDIR > > ... and maybe utilizing $$ (the pid) in tmp file names. > > > | Systems Administrator . technolust.cx irc.spamnet.org 6667 | > > > Tomi > |