From 775bff681c1ba7b2e8fb5106e891b10894cd0e3a Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sun, 24 Jan 1999 14:08:55 +0000 Subject: Adding first of the fixes for SSL. 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 | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index df5a584aab..ff8ccff99b 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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; -- cgit