forked from public/pyceo
Require TGT in ldap_init
This commit is contained in:
parent
bac4db4f4d
commit
4ede8212d5
|
@ -371,13 +371,9 @@ void ceo_ldap_init() {
|
|||
if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &proto) != LDAP_OPT_SUCCESS)
|
||||
ldap_fatal("ldap_set_option");
|
||||
|
||||
ceo_krb5_auth(admin_bind_userid);
|
||||
|
||||
if (ldap_sasl_interactive_bind_s(ld, NULL, sasl_mech, NULL, NULL,
|
||||
LDAP_SASL_QUIET, &ldap_sasl_interact, NULL) != LDAP_SUCCESS)
|
||||
ldap_fatal("Bind failed");
|
||||
|
||||
ceo_krb5_deauth();
|
||||
}
|
||||
|
||||
void ceo_ldap_cleanup() {
|
||||
|
|
|
@ -270,6 +270,7 @@ int main(int argc, char *argv[]) {
|
|||
fatalpe("setenv");
|
||||
|
||||
ceo_krb5_init();
|
||||
ceo_krb5_auth(admin_bind_userid);
|
||||
ceo_ldap_init();
|
||||
ceo_kadm_init();
|
||||
|
||||
|
@ -277,6 +278,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
ceo_kadm_cleanup();
|
||||
ceo_ldap_cleanup();
|
||||
ceo_krb5_deauth();
|
||||
ceo_krb5_cleanup();
|
||||
|
||||
free_config();
|
||||
|
|
Loading…
Reference in New Issue