[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Check that mktemp result is a directory



commit 0a0c5d7c0e6d45789f4351c0b56511c80f13eaa0
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Sat Feb 7 14:48:06 2015 +0100

    Check that mktemp result is a directory
    
    Fixes part of bug #14478, patch idea suggested by an anonymous
    contributor. Thanks!
---
 src/test/zero_length_keys.sh |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/test/zero_length_keys.sh b/src/test/zero_length_keys.sh
index 7c99564..0dd67c1 100755
--- a/src/test/zero_length_keys.sh
+++ b/src/test/zero_length_keys.sh
@@ -30,6 +30,10 @@ if [ -z "$DATA_DIR" ]; then
   echo "Failure: mktemp invocation returned empty string"
   exit 255
 fi
+if [ -d "$DATA_DIR" ]; then
+  echo "Failure: mktemp invocation result doesn't point to directory"
+  exit 255
+fi
 trap "rm -rf '$DATA_DIR'" 0
 
 # DisableNetwork means that the ORPort won't actually be opened.



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits