diff options
author | Jeremy Allison <jra@samba.org> | 2007-03-28 01:11:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:58 -0500 |
commit | e9157961d6c89318de4c7ff5a700aed640d91d92 (patch) | |
tree | 77ea345d2b45bf351c58ba9ba0fb30d01ef8f0fa /source3/libsmb | |
parent | 3215c09a8147e7df111e4e0817091285cd7240cb (diff) | |
download | samba-e9157961d6c89318de4c7ff5a700aed640d91d92.tar.gz samba-e9157961d6c89318de4c7ff5a700aed640d91d92.tar.bz2 samba-e9157961d6c89318de4c7ff5a700aed640d91d92.zip |
r21997: Implement the server side of gss seal negotiate.
Jeremy.
(This used to be commit 6b923acfee59e39eea69e9e9a00f1f6118ed4270)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/smb_seal.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c index ed2c66013e..891673ed15 100644 --- a/source3/libsmb/smb_seal.c +++ b/source3/libsmb/smb_seal.c @@ -332,8 +332,12 @@ static void common_free_gss_state(struct smb_tran_enc_state_gss **pp_gss_state) OM_uint32 minor = 0; struct smb_tran_enc_state_gss *gss_state = *pp_gss_state; - gss_release_cred(&minor, &gss_state->creds); - gss_delete_sec_context(&minor, &gss_state->gss_ctx, NULL); + if (gss_state->creds != GSS_C_NO_CREDENTIAL) { + gss_release_cred(&minor, &gss_state->creds); + } + if (gss_state->gss_ctx != GSS_C_NO_CONTEXT) { + gss_delete_sec_context(&minor, &gss_state->gss_ctx, NULL); + } SAFE_FREE(*pp_gss_state); } #endif |