From: Florian Weimer <fw@deneb•enyo.de>
To: Herbert Xu <herbert@gondor•apana.org.au>
Cc: pj@sgi•com (Paul Jackson), pasky@ucw•cz, git@vger•kernel.org, mj@ucw•cz
Subject: Re: fix mktemp (remove mktemp ;)
Date: Mon, 18 Apr 2005 14:12:40 +0200 [thread overview]
Message-ID: <87u0m4cmh3.fsf@deneb.enyo.de> (raw)
In-Reply-To: <E1DNMVX-00013d-00@gondolin.me.apana.org.au> (Herbert Xu's message of "Mon, 18 Apr 2005 13:01:07 +1000")
* Herbert Xu:
> Paul Jackson <pj@sgi•com> wrote:
>>
>> Even mktemp(1) can collide, in theory, since there is no practical way
>> in shell scripts to hold open and locked the file from the instant of it
>> is determined to be a unique name.
>
> mktemp(1) creates the file before exiting. Other instances of mktemp(1)
> cannot successfully create the same file (they all use O_EXCL).
> Therefore this race does not exist, even in theory :)
/tmp cleaners exist, but the risks are minimal for programs which
aren't SUID/SGID.
prev parent reply other threads:[~2005-04-18 12:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-16 23:27 [PATCH] fix mktemp (remove mktemp ;) Paul Jackson
2005-04-16 23:27 ` [PATCH] missing mkdir -p flag in gitdiff-do Paul Jackson
2005-04-16 23:28 ` [PATCH] optimize gitdiff-do script Paul Jackson
2005-04-16 23:43 ` Petr Baudis
2005-04-17 0:10 ` Paul Jackson
2005-04-18 15:23 ` Paul Jackson
2005-04-18 18:30 ` Petr Baudis
2005-04-18 19:17 ` Paul Jackson
2005-05-10 2:56 ` Paul Jackson
2005-04-16 23:36 ` [PATCH] fix mktemp (remove mktemp ;) Jan-Benedict Glaw
2005-04-16 23:46 ` Paul Jackson
2005-04-16 23:37 ` Petr Baudis
2005-04-17 0:02 ` Paul Jackson
2005-04-17 0:33 ` Dave Jones
2005-04-17 0:44 ` Paul Jackson
2005-04-17 0:57 ` Dave Jones
2005-04-17 1:03 ` David Lang
2005-04-17 1:15 ` Paul Jackson
2005-04-17 2:38 ` Brian O'Mahoney
2005-04-17 2:46 ` Paul Jackson
2005-04-17 0:51 ` Erik van Konijnenburg
2005-04-17 1:18 ` Paul Jackson
2005-04-18 3:01 ` Herbert Xu
2005-04-18 4:47 ` Paul Jackson
2005-04-18 12:12 ` Florian Weimer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87u0m4cmh3.fsf@deneb.enyo.de \
--to=fw@deneb$(echo .)enyo.de \
--cc=git@vger$(echo .)kernel.org \
--cc=herbert@gondor$(echo .)apana.org.au \
--cc=mj@ucw$(echo .)cz \
--cc=pasky@ucw$(echo .)cz \
--cc=pj@sgi$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox