summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>1999-01-24 14:08:55 +0000
committerRichard Sharpe <sharpe@samba.org>1999-01-24 14:08:55 +0000
commit775bff681c1ba7b2e8fb5106e891b10894cd0e3a (patch)
treecbd6cf398a338a8dad506e94d7ea3017d7b3da3e
parentb4e34006e88308aa0f315648992a15501399cf10 (diff)
downloadsamba-775bff681c1ba7b2e8fb5106e891b10894cd0e3a.tar.gz
samba-775bff681c1ba7b2e8fb5106e891b10894cd0e3a.tar.bz2
samba-775bff681c1ba7b2e8fb5106e891b10894cd0e3a.zip
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)
-rw-r--r--source3/param/loadparm.c23
1 files 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;