mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Allow default arguments for client/server/proxy in ssl-opt.sh
ssl-opt.sh checks whether the client, server and proxy commands are names of executable files, forbidding the use of default arguments by by e.g. setting P_SRV="ssl_server2 debug_level=3". This commit relaxes this check, only considering the part of the command string prior to the first whitespace.
This commit is contained in:
		
							parent
							
								
									72ea31b026
								
							
						
					
					
						commit
						17c0493ca8
					
				@ -597,16 +597,22 @@ fi
 | 
				
			|||||||
get_options "$@"
 | 
					get_options "$@"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# sanity checks, avoid an avalanche of errors
 | 
					# sanity checks, avoid an avalanche of errors
 | 
				
			||||||
if [ ! -x "$P_SRV" ]; then
 | 
					P_SRV_BIN=$(echo "$P_SRV" | sed -r -n "s/^([^ ]*).*$/\1/p")
 | 
				
			||||||
    echo "Command '$P_SRV' is not an executable file"
 | 
					echo "Server binary: ${P_SRV_BIN}"
 | 
				
			||||||
 | 
					P_CLI_BIN=$(echo "$P_CLI" | sed -r -n "s/^([^ ]*).*$/\1/p")
 | 
				
			||||||
 | 
					echo "Client binary: ${P_CLI_BIN}"
 | 
				
			||||||
 | 
					P_PXY_BIN=$(echo "$P_PXY" | sed -r -n "s/^([^ ]*).*$/\1/p")
 | 
				
			||||||
 | 
					echo "Proxy binary: ${P_PXY_BIN}"
 | 
				
			||||||
 | 
					if [ ! -x "$P_SRV_BIN" ]; then
 | 
				
			||||||
 | 
					    echo "Command '$P_SRV_BIN' is not an executable file"
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
if [ ! -x "$P_CLI" ]; then
 | 
					if [ ! -x "$P_CLI_BIN" ]; then
 | 
				
			||||||
    echo "Command '$P_CLI' is not an executable file"
 | 
					    echo "Command '$P_CLI_BIN' is not an executable file"
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
if [ ! -x "$P_PXY" ]; then
 | 
					if [ ! -x "$P_PXY_BIN" ]; then
 | 
				
			||||||
    echo "Command '$P_PXY' is not an executable file"
 | 
					    echo "Command '$P_PXY_BIN' is not an executable file"
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
if [ "$MEMCHECK" -gt 0 ]; then
 | 
					if [ "$MEMCHECK" -gt 0 ]; then
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user