summaryrefslogtreecommitdiff
path: root/cifs.upcall.c
diff options
context:
space:
mode:
Diffstat (limited to 'cifs.upcall.c')
-rw-r--r--cifs.upcall.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/cifs.upcall.c b/cifs.upcall.c
index 9116e56..d895ccd 100644
--- a/cifs.upcall.c
+++ b/cifs.upcall.c
@@ -299,14 +299,24 @@ cifs_krb5_get_req(const char *principal, const char *ccname,
goto out_free_principal;
}
- apreq_pkt.data = NULL;
in_data.length = 0;
+ in_data.data = NULL;
+
+ ret = krb5_auth_con_init(context, &auth_context);
+ if (ret) {
+ syslog(LOG_DEBUG, "%s: unable to create auth_context: %d",
+ __func__, ret);
+ goto out_free_creds;
+ }
+
+ apreq_pkt.length = 0;
+ apreq_pkt.data = NULL;
ret = krb5_mk_req_extended(context, &auth_context, AP_OPTS_USE_SUBKEY,
&in_data, out_creds, &apreq_pkt);
if (ret) {
syslog(LOG_DEBUG, "%s: unable to make AP-REQ for %s",
__func__, principal);
- goto out_free_creds;
+ goto out_free_auth;
}
ret = krb5_auth_con_getsendsubkey(context, auth_context, &tokb);