summaryrefslogtreecommitdiffstats
path: root/source3/services/svc_netlogon.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/services/svc_netlogon.c
parent1e0684678eb1851735c9a3321837ad19ea4aba68 (diff)
downloadsamba-a48955306705ac7f045e3726d7097900550bebe3.tar.gz
samba-a48955306705ac7f045e3726d7097900550bebe3.tar.xz
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/services/svc_netlogon.c')
-rw-r--r--source3/services/svc_netlogon.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/source3/services/svc_netlogon.c b/source3/services/svc_netlogon.c
index 2aa5a31cde..1bbef325ac 100644
--- a/source3/services/svc_netlogon.c
+++ b/source3/services/svc_netlogon.c
@@ -25,33 +25,42 @@
/*********************************************************************
*********************************************************************/
-static WERROR netlogon_stop( const char *service, SERVICE_STATUS *service_status )
+static WERROR netlogon_status( const char *service, SERVICE_STATUS *service_status )
{
- return WERR_ACCESS_DENIED;
+ ZERO_STRUCTP( service_status );
+
+ service_status->type = 0x20;
+ service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
+
+ if ( lp_servicenumber("NETLOGON") != -1 ) {
+ service_status->state = SVCCTL_RUNNING;
+ service_status->win32_exit_code = WERR_SERVICE_NEVER_STARTED;
+ }
+ else
+ service_status->state = SVCCTL_STOPPED;
+
+ return WERR_OK;
}
/*********************************************************************
*********************************************************************/
-static WERROR netlogon_start( const char *service )
+static WERROR netlogon_stop( const char *service, SERVICE_STATUS *service_status )
{
+ netlogon_status( service, service_status );
+
return WERR_ACCESS_DENIED;
}
/*********************************************************************
*********************************************************************/
-static WERROR netlogon_status( const char *service, SERVICE_STATUS *service_status )
+static WERROR netlogon_start( const char *service )
{
- ZERO_STRUCTP( service_status );
+ if ( lp_servicenumber("NETLOGON") == -1 )
+ return WERR_SERVICE_DISABLED;
- service_status->type = 0x20;
- if ( lp_servicenumber("NETLOGON") != -1 )
- service_status->state = SVCCTL_RUNNING;
- else
- service_status->state = SVCCTL_STOPPED;
-
- return WERR_OK;
+ return WERR_ACCESS_DENIED;
}
/*********************************************************************