mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-getkeytab: Handle the possibility of not obtaining a result
The ldap_result operation can time out, returning a NULL result, which in turn causes the parsing operation to crash. https://fedorahosted.org/freeipa/ticket/5642 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
e668b06231
commit
d53c2f6b80
@ -275,6 +275,10 @@ static int ipa_ldap_extended_op(LDAP *ld, const char *reqoid,
|
||||
fprintf(stderr, _("Failed to get result: %s\n"), ldap_err2string(ret));
|
||||
goto done;
|
||||
}
|
||||
else if (res == NULL) {
|
||||
fprintf(stderr, _("Timeout exceeded."));
|
||||
goto done;
|
||||
}
|
||||
|
||||
ret = ldap_parse_extended_result(ld, res, &retoid, &retdata, 0);
|
||||
if (ret != LDAP_SUCCESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user