This patch was submitted by Jan Vcelak through Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=825837
Fixes
https://fedorahosted.org/sssd/ticket/1422
The patch looks fine by inspection. I've asked the original reporter to
test a scratch build since I don't have any 64-bit big-endian systems
available to test on.
I also opened
https://fedorahosted.org/sssd/ticket/1423 to examine our
other usages of ldap_set_option() for similar potential bugs.