From: Alexander Bokovoy Date: Fri, 3 Mar 2017 14:58:14 +0000 (+0200) Subject: s3-gse: convert to use smb_gss_krb5_import_cred X-Git-Tag: tdb-1.3.13~623 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d733d5791a6d82edda13ac39790bd8ba893f3d7;p=thirdparty%2Fsamba.git s3-gse: convert to use smb_gss_krb5_import_cred BUG: https://bugzilla.samba.org/show_bug.cgi?id=12611 Signed-off-by: Alexander Bokovoy Reviewed-by: Stefan Metzmacher --- diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c index abf20bc7dfd..f4238f32441 100644 --- a/source3/librpc/crypto/gse.c +++ b/source3/librpc/crypto/gse.c @@ -252,11 +252,12 @@ static NTSTATUS gse_init_client(TALLOC_CTX *mem_ctx, /* TODO: get krb5 ticket using username/password, if no valid * one already available in ccache */ - gss_maj = gss_krb5_import_cred(&gss_min, - gse_ctx->ccache, - NULL, /* keytab_principal */ - NULL, /* keytab */ - &gse_ctx->creds); + gss_maj = smb_gss_krb5_import_cred(&gss_min, + gse_ctx->k5ctx, + gse_ctx->ccache, + NULL, /* keytab_principal */ + NULL, /* keytab */ + &gse_ctx->creds); if (gss_maj) { char *ccache = NULL; int kret; @@ -268,7 +269,7 @@ static NTSTATUS gse_init_client(TALLOC_CTX *mem_ctx, ccache = NULL; } - DEBUG(5, ("gss_krb5_import_cred ccache[%s] failed with [%s] -" + DEBUG(5, ("smb_gss_krb5_import_cred ccache[%s] failed with [%s] -" "the caller may retry after a kinit.\n", ccache, gse_errstr(gse_ctx, gss_maj, gss_min))); SAFE_FREE(ccache); @@ -430,12 +431,13 @@ static NTSTATUS gse_init_server(TALLOC_CTX *mem_ctx, } /* This creates a GSSAPI cred_id_t with the keytab set */ - gss_maj = gss_krb5_import_cred(&gss_min, NULL, NULL, gse_ctx->keytab, - &gse_ctx->creds); + gss_maj = smb_gss_krb5_import_cred(&gss_min, gse_ctx->k5ctx, + NULL, NULL, gse_ctx->keytab, + &gse_ctx->creds); if (gss_maj != 0 && gss_maj != (GSS_S_CALL_BAD_STRUCTURE|GSS_S_BAD_NAME)) { - DEBUG(0, ("gss_krb5_import_cred failed with [%s]\n", + DEBUG(0, ("smb_gss_krb5_import_cred failed with [%s]\n", gse_errstr(gse_ctx, gss_maj, gss_min))); status = NT_STATUS_INTERNAL_ERROR; goto done;