summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-08 15:09:09 +0000
committerGerald Carter <jerry@samba.org>2006-02-08 15:09:09 +0000
commit822f43484bd9d92fb03d6988b89b234e61a53e35 (patch)
tree49d4f733ce8201d7fffef2ef6afdc031dbbd997f /source
parent74910ea3fa871a15aff547dd1ffd9fee5bf734ca (diff)
downloadsamba-822f43484bd9d92fb03d6988b89b234e61a53e35.tar.gz
samba-822f43484bd9d92fb03d6988b89b234e61a53e35.tar.xz
samba-822f43484bd9d92fb03d6988b89b234e61a53e35.zip
r13393: Do not initialize the lp_svcctl_list() value since it is handled
internally in services_db.c now. This prevents internal services from being listed twice (one internal and one external) when no 'svcctl list' parameter is explcitly set in smb.conf
Diffstat (limited to 'source')
-rw-r--r--source/lib/util_str.c3
-rw-r--r--source/param/loadparm.c2
-rw-r--r--source/rpc_server/srv_svcctl_nt.c2
-rw-r--r--source/services/services_db.c2
4 files changed, 5 insertions, 4 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 85b5cfc90a7..957ebd57bdd 100644
--- a/source/lib/util_str.c
+++ b/source/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/source/param/loadparm.c b/source/param/loadparm.c
index a8867280474..6ed6b90498c 100644
--- a/source/param/loadparm.c
+++ b/source/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/source/rpc_server/srv_svcctl_nt.c b/source/rpc_server/srv_svcctl_nt.c
index 049bdf60756..a0b8b66f508 100644
--- a/source/rpc_server/srv_svcctl_nt.c
+++ b/source/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/source/services/services_db.c b/source/services/services_db.c
index a16657c0edc..6c38c6ed0a9 100644
--- a/source/services/services_db.c
+++ b/source/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] ) )