s3-gse: move krb5 fallback to smb_gss_krb5_import_cred wrapper
authorAlexander Bokovoy <ab@samba.org>
Wed, 8 Mar 2017 10:38:49 +0000 (12:38 +0200)
committerAlexander Bokovoy <ab@samba.org>
Wed, 8 Mar 2017 21:00:24 +0000 (22:00 +0100)
commit57286d57732d49fdb8b8e21f584787cdbc917c32
treec3ba06cc8fc0c832e4ca5b9f07077bfa1999e5f8
parent3d733d5791a6d82edda13ac39790bd8ba893f3d7
s3-gse: move krb5 fallback to smb_gss_krb5_import_cred wrapper

MIT krb5 1.9 version of gss_krb5_import_cred() may fail when importing
credentials from a keytab without specifying actual principal.
This was fixed in MIT krb5 1.9.2 (see commit
71c3be093db577aa52f6b9a9a3a9f442ca0d8f20 in MIT krb5-1.9 branch, git
master's version is bd18687a705a8a6cdcb7c140764d1a7c6a3381b5).

Move fallback code to the smb_gss_krb5_import_cred wrapper. We only
expect this fallback to happen with krb5 GSSAPI mechanism, thus hard
code use of krb5 mech when calling to gss_acquire_cred.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12611

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Wed Mar  8 22:00:24 CET 2017 on sn-devel-144
lib/krb5_wrap/gss_samba.c
source3/librpc/crypto/gse.c