summaryrefslogtreecommitdiffstats
path: root/source/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-18 21:56:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:27 -0500
commit197c90ec78545e7e3c03ff5787839ca134f3036a (patch)
tree15c5c31b1cd2302476a6479b2524d87e0cd54685 /source/libsmb
parentee40cead097ed2c005f5f80b24c9f681e054849a (diff)
downloadsamba-197c90ec78545e7e3c03ff5787839ca134f3036a.tar.gz
samba-197c90ec78545e7e3c03ff5787839ca134f3036a.tar.xz
samba-197c90ec78545e7e3c03ff5787839ca134f3036a.zip
r22344: Correctly create sub-struct for GSS encryption.
Jeremy.
Diffstat (limited to 'source/libsmb')
-rw-r--r--source/libsmb/clifsinfo.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/libsmb/clifsinfo.c b/source/libsmb/clifsinfo.c
index be988a433f1..1ec1aea5af7 100644
--- a/source/libsmb/clifsinfo.c
+++ b/source/libsmb/clifsinfo.c
@@ -368,6 +368,21 @@ static struct smb_trans_enc_state *make_cli_enc_state(enum smb_trans_enc_type sm
}
ZERO_STRUCTP(es);
es->smb_enc_type = smb_enc_type;
+
+ if (smb_enc_type == SMB_TRANS_ENC_GSS) {
+#if defined(HAVE_GSSAPI) && defined(HAVE_KRB5)
+ es->s.gss_state = SMB_MALLOC_P(struct smb_tran_enc_state_gss);
+ if (!es->s.gss_state) {
+ SAFE_FREE(es);
+ return NULL;
+ }
+ ZERO_STRUCTP(es->s.gss_state);
+#else
+ DEBUG(0,("make_cli_enc_state: no krb5 compiled.\n");
+ SAFE_FREE(es);
+ return NULL;
+#endif
+ }
return es;
}