[alexandria-devel] Proposed addition of temporary file creation utilities

Stelian Ionescu sionescu at cddr.org
Wed Apr 25 12:42:17 UTC 2012


On Wed, 2012-04-25 at 06:26 -0400, Hans Hübner wrote:

> Dealing with the umask has no place in this library.  "umask" is a
> system-specific concept, and file security is something that is
> orthogonal to temporary files.  If an application wishes to give its
> temporary files different permissions than other files that it
> creates, it should do so explicitly.

Quite the opposite, the permissions must be specified at creation time,
otherwise it's useless


> And besides, why put temporary files into a shared directory in the
> first place? 

Old habits(a.k.a. Unix tradition). Distributions are slowly changing
this, but a Lisp library should work in any case


> The right way to deal with possible issues in this
> respect is to create an application specific temporary directory that
> is completely protected before starting the application, and
> communicating that directory to the application by the way of the TEMP
> or TMPDIR environment variable.  That is how Windows and OSX do it,
> and it is much better than trying to protect files in a shared /tmp/
> directory.  As if we did not have a hierarchical file system for a few
> decades.

That's not how they do it. Windows and OSX have a user-specific
temporary directory and applications usually create a subdirectory of
their own but with a well-known name: see documentation for
NSTemporaryDirectory, for example

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/alexandria-devel/attachments/20120425/50389a36/attachment.sig>


More information about the alexandria-devel mailing list