From: Andreas Schneider Date: Thu, 16 May 2019 11:41:02 +0000 (+0200) Subject: s3:smbspool: Print the principal we use to authenticate with X-Git-Tag: ldb-2.0.5~678 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42492d547661cb7a98c237b32d42ee93de35aba5;p=thirdparty%2Fsamba.git s3:smbspool: Print the principal we use to authenticate with BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 22071613677..efbdd418fdb 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -616,6 +616,7 @@ static bool kerberos_ccache_is_valid(void) { return false; } else { krb5_principal default_princ = NULL; + char *princ_name = NULL; code = krb5_cc_get_principal(ctx, ccache, @@ -625,6 +626,16 @@ static bool kerberos_ccache_is_valid(void) { krb5_free_context(ctx); return false; } + + code = krb5_unparse_name(ctx, + default_princ, + &princ_name); + if (code == 0) { + fprintf(stderr, + "DEBUG: Try to authenticate as %s\n", + princ_name); + krb5_free_unparsed_name(ctx, princ_name); + } krb5_free_principal(ctx, default_princ); } krb5_cc_close(ctx, ccache);