Skip to content
Snippets Groups Projects
Verified Commit 6fa2454d authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: ldap_authentication.sh escaping "'"

parent d0a1b54c
No related branches found
No related tags found
1 merge request!60FIX: ldap_authentication.sh
......@@ -32,8 +32,8 @@
exe_dir=$(dirname "$0")
. "$exe_dir/ldap.env"
LDAPTLS_REQCERT="${LDAP_TLS_REQCERT:-hard}"
BIND_DN_PATTERN="${BIND_DN_PATTERN:-'cn=${USER_NAME},${USER_BASE}'}"
WHO_AM_I_PATTERN="${WHO_AM_I_PATTERN:-'dn:${USER_NAME},${USER_BASE}'}"
BIND_DN_PATTERN="${BIND_DN_PATTERN:-"cn=\${USER_NAME},\${USER_BASE}"}"
WHO_AM_I_PATTERN="${WHO_AM_I_PATTERN:-"dn:cn=\${USER_NAME},\${USER_BASE}"}"
# If the second argument is empty or "-", take password from stdin, else use the argument as a file.
testpw() {
......@@ -56,6 +56,8 @@ testpw() {
elif [ "$result" = "$who_am_i" ] ; then
return 0
fi
echo "result : $result"
echo "pattern: $who_am_i"
return 1
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment