mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-11-03 23:35:26 +01:00 
			
		
		
		
	Try temp file creation in a different location
... if the standard directory /tmp is not allowed to write to. As noted in #1273 this might be the case for Termux on Android.
This commit is contained in:
		@@ -17194,7 +17194,12 @@ EOF
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
maketempf() {
 | 
					maketempf() {
 | 
				
			||||||
     TEMPDIR=$(mktemp -d /tmp/testssl.XXXXXX) || exit $ERR_FCREATE
 | 
					     TEMPDIR=$(mktemp -d /tmp/testssl.XXXXXX)
 | 
				
			||||||
 | 
					     if [[ $? -ne 0 ]]; then
 | 
				
			||||||
 | 
					          # for e.g. devices where we can't write to /tmp:
 | 
				
			||||||
 | 
					          TEMPPATH=$PWD
 | 
				
			||||||
 | 
					          TEMPDIR=$(mktemp -d $PWD/testssl.XXXXXX) || exit $ERR_FCREATE
 | 
				
			||||||
 | 
					     fi
 | 
				
			||||||
     TMPFILE=$TEMPDIR/tempfile.txt || exit $ERR_FCREATE
 | 
					     TMPFILE=$TEMPDIR/tempfile.txt || exit $ERR_FCREATE
 | 
				
			||||||
     if [[ "$DEBUG" -eq 0 ]]; then
 | 
					     if [[ "$DEBUG" -eq 0 ]]; then
 | 
				
			||||||
          ERRFILE="/dev/null"
 | 
					          ERRFILE="/dev/null"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user