We may not be able to obtain the full error string, so print what we can get.
This is required when the error is the the GSSAPI layer, not the mechanism.
Andrew Bartlett
if (gss_maj) {
goto done;
}
+ errstr = talloc_strndup(mem_ctx,
+ (char *)msg_maj.value,
+ msg_maj.length);
+ if (!errstr) {
+ goto done;
+ }
gss_maj = gss_display_status(&gss_min, min, GSS_C_MECH_CODE,
(gss_OID)discard_const(gss_mech_krb5),
&msg_ctx, &msg_min);
goto done;
}
- errstr = talloc_strndup(mem_ctx,
- (char *)msg_maj.value,
- msg_maj.length);
- if (!errstr) {
- goto done;
- }
errstr = talloc_strdup_append_buffer(errstr, ": ");
if (!errstr) {
goto done;