diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-20 12:04:45 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-20 12:04:45 +1000 |
commit | 8ee3ba791d38542e88995fa3beebdd183891ce60 (patch) | |
tree | 801a809672d26173f030138c0d45cc8e96e4933c /source3 | |
parent | 57ab47c02ed9eae2bbd92c3e5cae5d08b83025f4 (diff) | |
download | samba-8ee3ba791d38542e88995fa3beebdd183891ce60.tar.gz samba-8ee3ba791d38542e88995fa3beebdd183891ce60.tar.bz2 samba-8ee3ba791d38542e88995fa3beebdd183891ce60.zip |
s3-gse Allow printing the partial error string
We may not be able to obtain the full error string, so print what we can get.
This is required when the error is the the GSSAPI layer, not the mechanism.
Andrew Bartlett
Diffstat (limited to 'source3')
-rw-r--r-- | source3/librpc/crypto/gse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c index c311c774d4..cfa6bf1e0d 100644 --- a/source3/librpc/crypto/gse.c +++ b/source3/librpc/crypto/gse.c @@ -558,6 +558,12 @@ static char *gse_errstr(TALLOC_CTX *mem_ctx, OM_uint32 maj, OM_uint32 min) if (gss_maj) { goto done; } + errstr = talloc_strndup(mem_ctx, + (char *)msg_maj.value, + msg_maj.length); + if (!errstr) { + goto done; + } gss_maj = gss_display_status(&gss_min, min, GSS_C_MECH_CODE, (gss_OID)discard_const(gss_mech_krb5), &msg_ctx, &msg_min); @@ -565,12 +571,6 @@ static char *gse_errstr(TALLOC_CTX *mem_ctx, OM_uint32 maj, OM_uint32 min) goto done; } - errstr = talloc_strndup(mem_ctx, - (char *)msg_maj.value, - msg_maj.length); - if (!errstr) { - goto done; - } errstr = talloc_strdup_append_buffer(errstr, ": "); if (!errstr) { goto done; |