diff options
-rw-r--r-- | source3/lib/util_str.c | 3 | ||||
-rw-r--r-- | source3/param/loadparm.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_svcctl_nt.c | 2 | ||||
-rw-r--r-- | source3/services/services_db.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 85b5cfc90a..957ebd57bd 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -1852,6 +1852,9 @@ int str_list_count( const char **list ) { int i = 0; + if ( ! list ) + return 0; + /* count the number of list members */ for ( i=0; *list; i++, list++ ); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index a886728047..6ed6b90498 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1655,8 +1655,6 @@ static void init_globals(BOOL first_time_only) Globals.bASUSupport = True; - Globals.szServicesList = str_list_make( "Spooler NETLOGON", NULL ); - /* User defined shares. */ pstrcpy(s, dyn_LOCKDIR); pstrcat(s, "/usershares"); diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index 049bdf6075..a0b8b66f50 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -72,7 +72,7 @@ BOOL init_service_op_table( void ) /* services listed in smb.conf get the rc.init interface */ - for ( i=0; service_list[i]; i++ ) { + for ( i=0; service_list && service_list[i]; i++ ) { svcctl_ops[i].name = talloc_strdup( svcctl_ops, service_list[i] ); svcctl_ops[i].ops = &rcinit_svc_ops; } diff --git a/source3/services/services_db.c b/source3/services/services_db.c index a16657c0ed..6c38c6ed0a 100644 --- a/source3/services/services_db.c +++ b/source3/services/services_db.c @@ -436,7 +436,7 @@ void svcctl_init_keys( void ) for ( i=0; builtin_svcs[i].servicename; i++ ) add_new_svc_name( key, subkeys, builtin_svcs[i].servicename ); - for ( i=0; service_list[i]; i++ ) { + for ( i=0; service_list && service_list[i]; i++ ) { /* only add new services */ if ( regsubkey_ctr_key_exists( subkeys, service_list[i] ) ) |