Author: jra
Date: 2007-04-18 21:56:18 +0000 (Wed, 18 Apr 2007)
New Revision: 22344

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22344

Log:
Correctly create sub-struct for GSS encryption.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/libsmb/clifsinfo.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clifsinfo.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/clifsinfo.c        2007-04-18 21:10:37 UTC 
(rev 22343)
+++ branches/SAMBA_3_0/source/libsmb/clifsinfo.c        2007-04-18 21:56:18 UTC 
(rev 22344)
@@ -368,6 +368,21 @@
        }
        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;
 }
 

Reply via email to