diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-08 15:09:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:09:58 -0500 |
commit | ef3f2c9675194efa17cfd4b4b5393a6e0a335bdf (patch) | |
tree | e60dc191e4747a7fb678297701cecb2d1b6c60cb /source3 | |
parent | 034877ca335c64f6e2a08155c5856e03448397e1 (diff) | |
download | samba-ef3f2c9675194efa17cfd4b4b5393a6e0a335bdf.tar.gz samba-ef3f2c9675194efa17cfd4b4b5393a6e0a335bdf.tar.bz2 samba-ef3f2c9675194efa17cfd4b4b5393a6e0a335bdf.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
(This used to be commit 6c4ede6cee7e1d25a6357e959972e8d390c27fe3)
Diffstat (limited to 'source3')
-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] ) ) |