diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-12-28 14:21:31 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2010-12-28 09:23:46 -0500 |
commit | 1d8859b4111a363d30bd3256660e77a216e82a83 (patch) | |
tree | 0c91c19f6e6d6ce96e08f885be66249d04f94e43 /cifs.upcall.c | |
parent | e3c9b40fbe124bda174753785772e56344c68968 (diff) | |
download | cifs-utils-1d8859b4111a363d30bd3256660e77a216e82a83.tar.gz cifs-utils-1d8859b4111a363d30bd3256660e77a216e82a83.tar.bz2 cifs-utils-1d8859b4111a363d30bd3256660e77a216e82a83.zip |
cifs.upcall: use krb5_auth_con_init() to create an explicit auth_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'cifs.upcall.c')
-rw-r--r-- | cifs.upcall.c | 14 |
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); |