arenadata / gpdb

Arenadata DB
https://docs.arenadata.io/en/ADB/current/introduction/intro.html
Apache License 2.0
40 stars 22 forks source link

ADBDEV-5434: Do not treat interruption of LDAP requests by signals as an auth error (#899) #1007

Closed silent-observer closed 2 months ago

silent-observer commented 3 months ago

Do not treat interruption of LDAP requests by signals as an auth error.

When authorizing via ldap, the ldap_simple_bind_s function may return an error. This occurs when an internal call to the ldap_int_poll utility function is interrupted by a signal. The openldap library can handle this properly using the LDAP_OPT_RESTART option. Setting this option to LDAP_OPT_ON causes the select() system call to be restarted when interrupted by a signal. The default value is LDAP_OPT_OFF. This patch sets the value to LDAP_OPT_ON (also it requires explicitly specifying the -llber library to build) after ldap is initialized.

Changes for 7.2.0: Fix error reporting to match the surrounding code.

(cherry picked from commit edacbaffa49273e632bb99ee48dff2cf2caab346)


Note: do not squash the commit to preserve authorship.

RekGRpth commented 3 months ago

use option -x for git cherry-pick