zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Clint Adams <clint@zsh.org>
Cc: zsh-workers@sunsite.dk
Subject: Re: O_EXCL (was: How about MODDIR being configure'able?)
Date: Mon, 15 Oct 2001 20:42:50 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.21.0110152016290.4502-100000@life.blorf.net> (raw)
In-Reply-To: <20011015134107.A17772@dman.com>

On Mon, 15 Oct 2001, Clint Adams wrote:
> Hmm.. shouldn't that be O_CREAT|O_EXCL, which we're not doing in
> all cases?

You are right that O_EXCL (when combined with O_CREAT) is the vital
part of the incantation when creating new temp files, but it is not an
error that some of our open() calls that include O_CREAT do not use
O_EXCL.  For instance, the calls that write out the history file need
to succeed even if the file already exists, but they also want to
succeed when the file doesn't exist.  This is not a security problem
since (sane) people put their history file into their home dir (or
another non-world-writable dir) which is not vulnerable to the "rogue
symlink" exploit.  The code that creates a file based on the return of
mktemp() is all using O_EXCL, so we're OK.

..wayne..


  reply	other threads:[~2001-10-16  3:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-15 13:44 How about MODDIR being configure'able? Raúl Núñez de Arenas Coronado
2001-10-15 15:33 ` Bart Schaefer
2001-10-15 17:41   ` Clint Adams
2001-10-16  3:42     ` Wayne Davison [this message]
2001-10-16  4:12       ` O_EXCL (was: How about MODDIR being configure'able?) Clint Adams
2001-10-16 11:58   ` How about MODDIR being configure'able? Peter Stephenson

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=Pine.LNX.4.21.0110152016290.4502-100000@life.blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=clint@zsh.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).