diff options
author | Gerald Carter <jerry@samba.org> | 2005-12-11 04:21:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:47 -0500 |
commit | a48955306705ac7f045e3726d7097900550bebe3 (patch) | |
tree | 75e4c9f289256f9553f947c76602aba9f1dd7553 /source3/services/svc_wins.c | |
parent | 1e0684678eb1851735c9a3321837ad19ea4aba68 (diff) | |
download | samba-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/services/svc_wins.c')
-rw-r--r-- | source3/services/svc_wins.c | 32 |
1 files changed, 19 insertions, 13 deletions
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; } /********************************************************************* |