r13393: Do not initialize the lp_svcctl_list() value since it is handled
authorGerald Carter <jerry@samba.org>
Wed, 8 Feb 2006 15:09:09 +0000 (15:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:09:58 +0000 (11:09 -0500)
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

source/lib/util_str.c
source/param/loadparm.c
source/rpc_server/srv_svcctl_nt.c
source/services/services_db.c

index 85b5cfc90a7bec7523614e3cc0dd4ab16e8e36ad..957ebd57bdd75fe88f854c8ad36777c044af9919 100644 (file)
@@ -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++ );
index a8867280474811f84b323b76e671d605172a6fce..6ed6b90498c8544dd69d4440c0c9d8fcb0d06e35 100644 (file)
@@ -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");
index 049bdf6075674e4186f0d4156029484b0c641ba9..a0b8b66f508156fee7a0fbfa66975f1913925610 100644 (file)
@@ -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;
        }
index a16657c0edc6764dcf7bfbdeec20e0b9be47a057..6c38c6ed0a9ea2238833afa7a8e79fbf4433c48a 100644 (file)
@@ -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] ) )