我有一个openvpn插件,它允许我使用ldap身份验证。但是我的LDAP目录包含别名,而且openvpn-auth-ldap似乎没有遵循这些别名。
- (id) initWithURL: (LFString *) url timeout: (int) timeout {
...
ldap_initialize(&ldapConn, [url cString]);
if (!ldapConn) {
[TRLog error: "Unable to initialize LDAP server %s", [url cString]];
[self release];
return (NULL);
}
_timeout = timeout;
ldapTimeout.tv_sec = _timeout;
ldapTimeout.tv_usec = 0;
if (ldap_set_option(ldapConn, LDAP_OPT_NETWORK_TIMEOUT, &ldapTimeout) != LDAP_OPT_SUCCESS)
[TRLog warning: "Unable to set LDAP network timeout."];有什么我可以解决的吗?
发布于 2011-10-22 01:46:04
默认情况下,LDAP_OPT_DEREF设置为LDAP_DEREF_NEVER。也许您应该强制ldap连接的别名延迟:
int deref = LDAP_DEREF_ALWAYS;
ldap_set_option(ldapConn, LDAP_OPT_DEREF, &deref)https://stackoverflow.com/questions/7853170
复制相似问题