bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] clean-temp usage question


From: Bruno Haible
Subject: Re: [bug-gnulib] clean-temp usage question
Date: Fri, 6 Oct 2006 15:43:26 +0200
User-agent: KMail/1.9.1

Eric Blake wrote:
> Suppose the user is perverse
> enough (usually, only when trying to hammer out corner cases just like
> this ;) to run with a umask of 702 (ie. they want group but not user
> privileges).  As written, the current code creates an unusable directory.
>  Either we must document that a program that uses the clean-temp module
> must change umask, call create_temp_dir, and restore the umask, or we
> change mkdtemp to do that on our behalf.

mkdtemp is in glibc, and is documented:
  "The directory is created using mode `0700'."
If it doesn't do so, due to the umask, you can file a bug for glibc.

> But M4 currently uses the
> close-stream module which Paul and Jim maintain, and I am not sure whether
> they will be using your proposed patch to use fwriterror instead of fpending.

You are free to add a close_stream_temp function to the create-temp module
if you protect it with #ifdef so that it doesn't introduce a module
dependency.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]