diff --git a/etc/autofs/include_ldap b/etc/autofs/include_ldap index 58970c06a449..4cf70bfeef81 100644 --- a/etc/autofs/include_ldap +++ b/etc/autofs/include_ldap @@ -15,24 +15,41 @@ $1 == "'$ENTRY_ATTRIBUTE':" { key = $2 } -$1 == "'$VALUE_ATTRIBUTE':" && key { - printf "%s%s", key, OFS - key = "" - for (i=2; i 0 { + printf "%s%s", key, OFS + for (i = 2; i < nvalues; i++) { + printf "%s%s", value[i], OFS + } + if (b64 == 1) { + printf "%s", value[nvalues] | "b64decode -rp" + close("b64decode -rp") + printf "%s", ORS + } else { + printf "%s%s", value[nvalues], ORS + } +} + +NF == 0 { + key = "" + nvalues = 0 + delete value } '