Imported Debian patch 4.7.2-3
This commit is contained in:
committed by
Mario Fetka
parent
27edeba051
commit
8bc559c5a1
25
install/tools/ipa-httpd-pwdreader
Executable file
25
install/tools/ipa-httpd-pwdreader
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# This program is a handler written for Apache mod_ssl's SSLPassPhraseDialog.
|
||||
#
|
||||
# If you'd like to write your custom binary providing passwords to mod_ssl,
|
||||
# see the documentation of the aforementioned directive of the mod_ssl module.
|
||||
|
||||
USAGE="./ipa-pwdreader host:port RSA|DSA|ECC|number"
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Wrong number of arguments!" 1>&2
|
||||
echo "$USAGE" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fname=${1/:/-}-$2
|
||||
pwdpath=/var/lib/ipa/passwds/$fname
|
||||
|
||||
# Make sure the values passed in do not contain path information
|
||||
checkpath=$(/usr/bin/realpath -e ${pwdpath} 2>/dev/null)
|
||||
|
||||
if [ $pwdpath == "${checkpath}" ]; then
|
||||
cat $pwdpath
|
||||
else
|
||||
echo "Invalid path ${pwdpath}" 1>&2
|
||||
fi
|
||||
Reference in New Issue
Block a user