mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#6283 add missing env options
This commit is contained in:
parent
5e52ad6751
commit
b99fdb6506
@ -425,6 +425,11 @@ static void openldap_ldap_init_w_env(
|
|||||||
case ATTR_SASL:
|
case ATTR_SASL:
|
||||||
#ifdef HAVE_CYRUS_SASL
|
#ifdef HAVE_CYRUS_SASL
|
||||||
ldap_int_sasl_config( gopts, attrs[i].offset, value );
|
ldap_int_sasl_config( gopts, attrs[i].offset, value );
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case ATTR_GSSAPI:
|
||||||
|
#ifdef HAVE_GSSAPI
|
||||||
|
ldap_int_gssapi_config( gopts, attrs[i].offset, value );
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ATTR_TLS:
|
case ATTR_TLS:
|
||||||
@ -432,6 +437,24 @@ static void openldap_ldap_init_w_env(
|
|||||||
ldap_pvt_tls_config( NULL, attrs[i].offset, value );
|
ldap_pvt_tls_config( NULL, attrs[i].offset, value );
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
case ATTR_OPT_TV: {
|
||||||
|
struct timeval tv;
|
||||||
|
char *next;
|
||||||
|
tv.tv_usec = 0;
|
||||||
|
tv.tv_sec = strtol( value, &next, 10 );
|
||||||
|
if ( next != value && next[ 0 ] == '\0' && tv.tv_sec > 0 ) {
|
||||||
|
(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&tv );
|
||||||
|
}
|
||||||
|
} break;
|
||||||
|
case ATTR_OPT_INT: {
|
||||||
|
long l;
|
||||||
|
char *next;
|
||||||
|
l = strtol( value, &next, 10 );
|
||||||
|
if ( next != value && next[ 0 ] == '\0' && l > 0 && (long)((int)l) == l ) {
|
||||||
|
int v = (int)l;
|
||||||
|
(void)ldap_set_option( NULL, attrs[i].offset, (const void *)&v );
|
||||||
|
}
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user