summaryrefslogtreecommitdiff
path: root/source3/services
diff options
context:
space:
mode:
Diffstat (limited to 'source3/services')
-rw-r--r--source3/services/svc_netlogon.c33
-rw-r--r--source3/services/svc_wins.c32
2 files changed, 40 insertions, 25 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;
}
/*********************************************************************
diff --git a/source3/services/svc_wins.c b/source3/services/svc_wins.c
index 3a4650664d..37cfc99c06 100644
--- a/source3/services/svc_wins.c
+++ b/source3/services/svc_wins.c
@@ -25,33 +25,39 @@
/*********************************************************************
*********************************************************************/
-static WERROR wins_stop( const char *service, SERVICE_STATUS *service_status )
+static WERROR wins_status( const char *service, SERVICE_STATUS *service_status )
{
- return WERR_ACCESS_DENIED;
+ ZERO_STRUCTP( service_status );
+
+ service_status->type = 0x10;
+ service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
+
+ if ( lp_wins_support() )
+ service_status->state = SVCCTL_RUNNING;
+ else {
+ service_status->state = SVCCTL_STOPPED;
+ service_status->win32_exit_code = WERR_SERVICE_NEVER_STARTED;
+ }
+
+ return WERR_OK;
}
/*********************************************************************
*********************************************************************/
-static WERROR wins_start( const char *service )
+static WERROR wins_stop( const char *service, SERVICE_STATUS *service_status )
{
+ wins_status( service, service_status );
+
return WERR_ACCESS_DENIED;
}
/*********************************************************************
*********************************************************************/
-static WERROR wins_status( const char *service, SERVICE_STATUS *service_status )
+static WERROR wins_start( const char *service )
{
- ZERO_STRUCTP( service_status );
-
- service_status->type = 0x10;
- if ( lp_wins_support() )
- service_status->state = SVCCTL_RUNNING;
- else
- service_status->state = SVCCTL_STOPPED;
-
- return WERR_OK;
+ return WERR_ACCESS_DENIED;
}
/*********************************************************************