[git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-125-gc741c6f

by Werner Koch cvs at cvs.gnupg.org
Tue Nov 29 09:43:55 CET 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  c741c6fc3aaa8b75a434faa143c06dd059970d41 (commit)
      from  88fea6abe6b83eb2a69dd62dbbfe19ad5c450d86 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c741c6fc3aaa8b75a434faa143c06dd059970d41
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Nov 29 08:52:12 2011 +0100

    Make sure HOME et al have no unsafe characters.

diff --git a/ChangeLog b/ChangeLog
index 7e17ba8..5e5a014 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-29  Werner Koch  <wk at g10code.com>
+
+	* autogen.sh: Make sure HOME et al have no unsafe characters.
+
 2011-11-28  Jim Meyering  <meyering at redhat.com>
 
 	accept --with-libgpg-error-prefix as well as --with-gpg-error-prefix
diff --git a/autogen.sh b/autogen.sh
index f4a1de7..8a424bc 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -47,6 +47,26 @@ if test x"$1" = x"--force"; then
   shift
 fi
 
+# Reject unsafe characters in $HOME, $tsdir and cwd.  We consider spaces
+# as unsafe because it is too easy to get scripts wrong in this regard.
+am_lf='
+'
+case `pwd` in
+  *[\;\\\"\#\$\&\'\`$am_lf\ \	]*)
+    echo "unsafe working directory name"; DIE=yes;;
+esac
+case $tsdir in
+  *[\;\\\"\#\$\&\'\`$am_lf\ \	]*)
+    echo "unsafe source directory: \`$tsdir'"; DIE=yes;;
+esac
+case $HOME in
+  *[\;\\\"\#\$\&\'\`$am_lf\ \	]*)
+    echo "unsafe home directory: \`$HOME'"; DIE=yes;;
+esac
+if test "$DIE" = "yes"; then
+  exit 1
+fi
+
 # Begin list of optional variables sourced from ~/.gnupg-autogen.rc
 w32_toolprefixes=
 w32_extraoptions=
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index fec5405..1a664ca 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-29  Werner Koch  <wk at g10code.com>
+
+	* build-all.sh: Make sure HOME has no unsafe characters.
+
 2011-11-28  Werner Koch  <wk at g10code.com>,
 	    Jim Meyering  <jim at meyering.net>
 
diff --git a/scripts/build-all.sh b/scripts/build-all.sh
index 3cd4f30..23af620 100755
--- a/scripts/build-all.sh
+++ b/scripts/build-all.sh
@@ -17,6 +17,23 @@
 p=$HOME/tmp/gpg-tmp
 parts="libgpg-error libassuan libksba libgcrypt gnupg"
 die=no
+here="`pwd`"
+
+# Reject unsafe characters in $PWD and $HOME.  We consider spaces as
+# unsafe because it is too easy to get scripts wrong in this regard.
+am_lf='
+'
+case $here in
+  *[\;\\\"\#\$\&\'\`$am_lf\ \	]*)
+    echo "unsafe working directory: \`$here'"; die=yes;;
+esac
+case $HOME in
+  *[\;\\\"\#\$\&\'\`$am_lf\ \	]*)
+    echo "unsafe home directory: \`$HOME'"; die=yes;;
+esac
+test $die = yes && exit 1
+
+# Check that all components are available
 for i in $parts; do
   if test -d $i ; then
     :
@@ -35,7 +52,6 @@ done
 
 export PATH=$p/bin:$PATH
 export LD_LIBRARY_PATH=$p/lib
-here="$(pwd)"
 
 prev=
 cfg="configure --enable-maintainer-mode --prefix=$p"

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |    4 ++++
 autogen.sh           |   20 ++++++++++++++++++++
 scripts/ChangeLog    |    4 ++++
 scripts/build-all.sh |   18 +++++++++++++++++-
 4 files changed, 45 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list