summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/gssapi/acquire_cred.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-12-01 22:18:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:57 -0500
commit6913dddf644525f4bdadfb740b5bff41abe030b2 (patch)
tree5325b59915008cd16f1f5bf6ab242e8788b0b808 /source4/heimdal/lib/gssapi/acquire_cred.c
parentf536c4a608bc8de3a9a0fd73f4c75f3183caa547 (diff)
downloadsamba-6913dddf644525f4bdadfb740b5bff41abe030b2.tar.gz
samba-6913dddf644525f4bdadfb740b5bff41abe030b2.tar.bz2
samba-6913dddf644525f4bdadfb740b5bff41abe030b2.zip
r12000: Update to current lorikeet-heimdal, including in particular support
for referencing an existing in-MEMORY keytab (required for the new way we push that to GSSAPI). Andrew Bartlett (This used to be commit 2426581dfb9f5f0f9367f846c01dfd3c30fea954)
Diffstat (limited to 'source4/heimdal/lib/gssapi/acquire_cred.c')
-rw-r--r--source4/heimdal/lib/gssapi/acquire_cred.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/heimdal/lib/gssapi/acquire_cred.c b/source4/heimdal/lib/gssapi/acquire_cred.c
index 44dbef3c48..fa5d709a30 100644
--- a/source4/heimdal/lib/gssapi/acquire_cred.c
+++ b/source4/heimdal/lib/gssapi/acquire_cred.c
@@ -33,7 +33,7 @@
#include "gssapi_locl.h"
-RCSID("$Id: acquire_cred.c,v 1.25 2005/11/02 08:56:25 lha Exp $");
+RCSID("$Id: acquire_cred.c,v 1.27 2005/12/01 16:26:02 lha Exp $");
OM_uint32
_gssapi_krb5_ccache_lifetime(OM_uint32 *minor_status,
@@ -245,6 +245,17 @@ static OM_uint32 acquire_acceptor_cred
kret = get_keytab(context, &handle->keytab);
if (kret)
goto end;
+
+ /* check that the requested principal exists in the keytab */
+ if (handle->principal) {
+ krb5_keytab_entry entry;
+
+ kret = krb5_kt_get_entry(gssapi_krb5_context, handle->keytab,
+ handle->principal, 0, 0, &entry);
+ if (kret)
+ goto end;
+ krb5_kt_free_entry(gssapi_krb5_context, &entry);
+ }
ret = GSS_S_COMPLETE;
end: