Fixed ldapsearch timeout limit

This commit is contained in:
Андрей Лимачко 2023-01-10 17:12:30 +04:00
parent 04c969ec83
commit 6adac17304
Signed by: liannnix
GPG Key ID: 1D8EEB2E408272C0

View File

@ -522,7 +522,7 @@ _ldap_get_computer()
filter="$3"
fi
domain_dn=$(echo $DOMAIN_DOMAIN | sed 's/\./,dc=/g' | sed 's/^/dc=/')
local searchcmd="ldapsearch -Y GSSAPI -N -h $dc -b $domain_dn"
local searchcmd="ldapsearch -o nettimeout=30 -Y GSSAPI -N -h $dc -b $domain_dn"
searchcmd="$searchcmd \"(&(ObjectClass=computer)(objectCategory=Computer)(name=$computer))\""
__command_msg "$searchcmd $filter"
_command -q "$searchcmd" "$filter" || retval=2