Adding first of the fixes for SSL.
authorRichard Sharpe <sharpe@samba.org>
Sun, 24 Jan 1999 14:08:55 +0000 (14:08 +0000)
committerRichard Sharpe <sharpe@samba.org>
Sun, 24 Jan 1999 14:08:55 +0000 (14:08 +0000)
A whole bunch of string variables in loadparm.c were
not being initialized properly.  Programs crashed as a result.

This set of code not tested, but same code tested elsewhere,
and all this guarded by #ifdef HAVE_SSL
(This used to be commit fb6048bb8655e8bd87cc69b48c99219d6701a907)

source3/param/loadparm.c

index df5a584aaba9688b9ec93d3e341f6afec61f45d7..ff8ccff99b615f64b86631577234f71d642c6d7e 100644 (file)
@@ -923,15 +923,20 @@ static void init_globals(void)
 
 #ifdef WITH_SSL
   Globals.sslVersion = SMB_SSL_V23;
-  Globals.sslHostsRequire = NULL;
-  Globals.sslHostsResign = NULL;
-  Globals.sslCaCertDir = NULL;
-  Globals.sslCaCertFile = NULL;
-  Globals.sslCert = NULL;
-  Globals.sslPrivKey = NULL;
-  Globals.sslClientCert = NULL;
-  Globals.sslClientPrivKey = NULL;
-  Globals.sslCiphers = NULL;
+
+  /*
+   * Most of the next variables should be string_set!
+   */
+
+  string_set(&Globals.sslHostsRequire, NULL);
+  string_set(&Globals.sslHostsResign, NULL);
+  string_set(&Globals.sslCaCertDir, NULL);
+  string_set(&Globals.sslCaCertFile, NULL);
+  string_set(&Globals.sslCert, NULL);
+  string_set(&Globals.sslPrivKey, NULL);
+  string_set(&Globals.sslClientCert, NULL);
+  string_set(&Globals.sslClientPrivKey, NULL);
+  string_set(&Globals.sslCiphers, NULL);
   Globals.sslEnabled = False;
   Globals.sslReqClientCert = False;
   Globals.sslReqServerCert = False;