+#else /* NOT HAVE_KRB5_TKT_CREDS_SET_IMPERSONATE */
+ krb5_free_principal(state->krb5_ctx, state->in_creds.client);
+ k5ret = smb_krb5_parse_name(state->krb5_ctx,
+ state->impersonate_principal_str,
+ &state->in_creds.client);
+ status = krb5_to_nt_status(k5ret);
+ if (tevent_req_nterror(req, status)) {
+ return tevent_req_post(req, ev);
+ }
+
+ k5ret = krb5_get_credentials_for_user(state->krb5_ctx,
+ KRB5_GC_CANONICALIZE |
+ KRB5_GC_FORWARDABLE |
+ KRB5_GC_NO_STORE,
+ state->service_ccache,
+ &state->in_creds,
+ NULL, /* krb5_data *subject_cert */
+ &out_creds);
+ status = krb5_to_nt_status(k5ret);
+ if (tevent_req_nterror(req, status)) {
+ return tevent_req_post(req, ev);
+ }
+
+ state->out_creds = *out_creds;
+ ZERO_STRUCTP(out_creds);
+ krb5_free_creds(state->krb5_ctx, out_creds);
+
+ tevent_req_done(req);
+ return tevent_req_post(req, ev);
+#endif /* NOT HAVE_KRB5_TKT_CREDS_SET_IMPERSONATE */