diff options
author | Andreas Schneider <asn@samba.org> | 2019-05-16 13:41:02 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-05-23 09:41:17 +0000 |
commit | 42492d547661cb7a98c237b32d42ee93de35aba5 (patch) | |
tree | 5c6dc25d063107624ada8d5cf33a44ab60912304 /source3/client | |
parent | 6086efb6808089c431e7307fa239924bfda1185b (diff) | |
download | samba-42492d547661cb7a98c237b32d42ee93de35aba5.tar.gz |
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 <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/smbspool.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); |