[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
world readable temp files and bash? set -C, noclobber (gnustandards sugg
From: |
Michael V. Antosha |
Subject: |
world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question) |
Date: |
Mon, 24 Jan 2011 13:07:50 +0200 |
Hello!
I'm studying the GNU Coding Standards (in hope to contribute to the GNUpdf),
and I have a minor suggestion to the standards document.
In my opinion mentioning "set -C" is not very clear. It needs a bit
more explanation.
Of course I could be wrong but in case it misled me (and I do have
some practical experience with bash scripting) it could mislead or
confuse the others who reads the standard as well.
My suggestion (along with my doubts as comments) are placed below.
Note: The "---" version corresponds to this:
http://cvs.savannah.gnu.org/viewvc/*checkout*/gnustandards/standards.texi?revision=1.201&root=gnustandards
Best regards,
Michael.
D:\...shared_repos\gnustandards\mivael>bzr diff
=== modified file 'standards.texi'
--- 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.
address@hidden But, anyway, how this prevents from creating world readable
files?
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
@node Libraries
@section Library Behavior
--
Michael V. Antosha
http://identi.ca/mivael
- world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question),
Michael V. Antosha <=
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Ralf Wildenhues, 2011/01/25
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Karl Berry, 2011/01/25
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Michael V. Antosha, 2011/01/26
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Karl Berry, 2011/01/26
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Ralf Wildenhues, 2011/01/27
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Michael V. Antosha, 2011/01/27
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Karl Berry, 2011/01/28
- Re: world readable temp files and bash? set -C, noclobber (gnustandards suggestion and/or question), Ralf Wildenhues, 2011/01/28