summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_svcctl_nt.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-12-11 04:21:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:47 -0500
commita48955306705ac7f045e3726d7097900550bebe3 (patch)
tree75e4c9f289256f9553f947c76602aba9f1dd7553 /source3/rpc_server/srv_svcctl_nt.c
parent1e0684678eb1851735c9a3321837ad19ea4aba68 (diff)
downloadsamba-a48955306705ac7f045e3726d7097900550bebe3.tar.gz
samba-a48955306705ac7f045e3726d7097900550bebe3.tar.bz2
samba-a48955306705ac7f045e3726d7097900550bebe3.zip
r12173: doing some service control work
* Add a few new error codes for disabled services * dump some more details about service status in 'net rpc service' * disable the WINS and NetLogon services if not configured in smb.conf Still trying to figure out how to disable the start button on the NetLogon and WINS services. (This used to be commit c0f54eeebc84ec9fab63c5b105511762bcc136be)
Diffstat (limited to 'source3/rpc_server/srv_svcctl_nt.c')
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index bbf313f7fa..97c38753c3 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -615,9 +615,20 @@ static WERROR fill_svc_config( TALLOC_CTX *ctx, const char *name, SERVICE_CONFIG
config->tag_id = 0x00000000; /* unassigned loadorder group */
config->service_type = SVCCTL_WIN32_OWN_PROC;
- config->start_type = SVCCTL_DEMAND_START;
config->error_control = SVCCTL_SVC_ERROR_NORMAL;
+ /* set the start type. NetLogon and WINS are disabled to prevent
+ the client from showing the "Start" button (if of course the services
+ are not running */
+
+ 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;
+ else
+ config->start_type = SVCCTL_DEMAND_START;
+
+
TALLOC_FREE( values );
return WERR_OK;