bug-standards
[Top][All Lists]
Advanced

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

Re: world readable temp files and bash? set -C, noclobber (gnustandards


From: Ralf Wildenhues
Subject: Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question)
Date: Tue, 25 Jan 2011 20:09:12 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Michael,

* Michael V. Antosha wrote on Mon, Jan 24, 2011 at 12:07:50PM CET:
> --- standards.texi      2011-01-24 09:47:11 +0000
> +++ standards.texi      2011-01-24 10:28:12 +0000
> @@ -703,7 +703,12 @@
>  @noindent
>  or by using the @code{mkstemps} function from libiberty.
> 
> -In bash, use @code{set -C} to avoid this problem.
> +In bash scripts, use @code{set -C} (@code{set -o noclobber})
> +to avoid this problem.

FWIW, th above looks like a good change to me, but of course Karl is the
person to handle this.

> address@hidden But, anyway, how this prevents from creating world readable 
> files?

Well, you can do that already by setting your umask appropriately.

> address@hidden According to the bash man page, noclobber should prevent from
> address@hidden unintentional truncating to zero size of existing files,
> address@hidden but in case file doesn't exist, it just created. -- mivael

Which is exactly what is intended here, no?

Cheers,
Ralf



reply via email to

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