mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 13:55:25 +01:00 
			
		
		
		
	Bail out if user error bc of umask
If a user chose a broken umask testssl.sh will start but emits subsequent errors. This patch adds two sanity checks whether it is allowed to create and read files in the temp directory. Fixes #2449
This commit is contained in:
		| @@ -20518,7 +20518,9 @@ maketempf() { | ||||
|           fi | ||||
|           TEMPDIR=$(mktemp -d "$PWD/testssl.XXXXXX") || exit $ERR_FCREATE | ||||
|      fi | ||||
|      TMPFILE=$TEMPDIR/tempfile.txt || exit $ERR_FCREATE | ||||
|      ls "$TEMPDIR/" 2>/dev/null || fatal "temporary directory needed not readeable" $ERR_FCREATE | ||||
|      TMPFILE=$TEMPDIR/tempfile.txt | ||||
|      touch $TEMPFILE 2>/dev/null || fatal "temporary directory needed not writeable" $ERR_FCREATE | ||||
|      if [[ "$DEBUG" -eq 0 ]]; then | ||||
|           ERRFILE="/dev/null" | ||||
|      else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dirk Wetter
					Dirk Wetter