[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
[samba.git] / source / rpc_server / srv_svcctl_nt.c
index a8009cf71f285ea91d5e87bc9850ba9c3e6bb6be..c868f94f767fe11deedf1849dfbe2e78edd697b9 100644 (file)
@@ -18,8 +18,7 @@
  *  GNU General Public License for more details.
  *  
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "includes.h"
@@ -50,9 +49,9 @@ extern SERVICE_CONTROL_OPS wins_svc_ops;
 
 struct service_control_op *svcctl_ops;
 
-static struct generic_mapping scm_generic_map =
+static const struct generic_mapping scm_generic_map =
        { SC_MANAGER_READ_ACCESS, SC_MANAGER_WRITE_ACCESS, SC_MANAGER_EXECUTE_ACCESS, SC_MANAGER_ALL_ACCESS };
-static struct generic_mapping svc_generic_map =
+static const struct generic_mapping svc_generic_map =
        { SERVICE_READ_ACCESS, SERVICE_WRITE_ACCESS, SERVICE_EXECUTE_ACCESS, SERVICE_ALL_ACCESS };
 
 
@@ -627,7 +626,7 @@ static WERROR fill_svc_config( TALLOC_CTX *ctx, const char *name, SERVICE_CONFIG
           the client from showing the "Start" button (if of course the services
           are not running */
 
-       if ( strequal( name, "NETLOGON" ) && ( !share_defined(name) ) )
+       if ( strequal( name, "NETLOGON" ) && ( lp_servicenumber(name) == -1 ) )
                config->start_type = SVCCTL_DISABLED;
        else if ( strequal( name, "WINS" ) && ( !lp_wins_support() ))
                config->start_type = SVCCTL_DISABLED;