[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Temporary file creation
From: |
David Allouche |
Subject: |
Re: [Texmacs-dev] Temporary file creation |
Date: |
Thu, 11 Sep 2003 14:31:07 +0200 |
User-agent: |
Mutt/1.5.4i |
On Thu, Sep 11, 2003 at 11:05:56AM +0200, Norbert Nemec wrote:
> Sorry, I just realized after searching the web, that this already has been
> discussed on this list a while ago:
> http://mail.gnu.org/archive/html/texmacs-dev/2003-02/msg00061.html
>
> From that point of view, I would clearly suggest to
> 1) use tmpname to create a name for a *subdirectory* in /tmp
> 2) create that directory with restrictive permissions
> 3) make sure that the permissions are correct and it really is a directory
> (and not a symlink, etc.)
> 4) do whatever you like within the directory without having to worry about
> filenames
I do not think I made my opinion very clear before, but I agree this
is probably the best way to go.
Note however that the portability of mkdtemp(3) to lower Unixen might
be problematic. The man page reads:
CONFORMING TO
Introduced in OpenBSD 2.2. Available since glibc 2.1.91.
and Joris seems to have made a policy not to depend on lstat(2)
because of a portability problem he experienced with a fully
statically linked (including a statically linked libc) texmacs
executable.
So how to implement this proposal is still unclear.
Though, now that texmacs no longer uses insecure temporary files, this
has become a low priority change. Understand: do not expect Joris or
me to do it, but I think contributions going in this direction should
be accepted.
--
-- ddaa