diff options
author | Gerald Carter <jerry@samba.org> | 2005-06-15 15:18:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:16 -0500 |
commit | 5b678f7a8469e345a6b25fa19ea1a20fce939a21 (patch) | |
tree | 6699c3a948622073982cf78897c2f011be5e7d84 /source3/services | |
parent | 7cbd740c62238406e64819e3594caeca341a25c9 (diff) | |
download | samba-5b678f7a8469e345a6b25fa19ea1a20fce939a21.tar.gz samba-5b678f7a8469e345a6b25fa19ea1a20fce939a21.tar.bz2 samba-5b678f7a8469e345a6b25fa19ea1a20fce939a21.zip |
r7610: can successfully stop and start the 'spooler' service by setting the state for the 'disable spoolss' parameter in memory for an individual smbd
(This used to be commit f19c10d0c3e7701066b765c712df0636e914bf7e)
Diffstat (limited to 'source3/services')
-rw-r--r-- | source3/services/svc_spoolss.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/services/svc_spoolss.c b/source3/services/svc_spoolss.c index bd2f7173f1..5f8fa73ced 100644 --- a/source3/services/svc_spoolss.c +++ b/source3/services/svc_spoolss.c @@ -27,6 +27,16 @@ static WERROR spoolss_stop( SERVICE_STATUS *service_status ) { + ZERO_STRUCTP( service_status ); + + lp_set_spoolss_state( SVCCTL_STOPPED ); + + service_status->type = 0x110; + service_status->state = SVCCTL_STOPPED; + service_status->controls_accepted = SVCCTL_ACCEPT_STOP; + + DEBUG(6,("spoolss_stop: spooler stopped (not really)\n")); + return WERR_OK; } @@ -35,6 +45,13 @@ static WERROR spoolss_stop( SERVICE_STATUS *service_status ) static WERROR spoolss_start( void ) { + /* see if the smb.conf will support this anyways */ + + if ( _lp_disable_spoolss() ) + return WERR_ACCESS_DENIED; + + lp_set_spoolss_state( SVCCTL_RUNNING ); + return WERR_OK; } @@ -43,6 +60,10 @@ static WERROR spoolss_start( void ) static WERROR spoolss_status( SERVICE_STATUS *service_status ) { + service_status->type = 0x110; + service_status->state = lp_get_spoolss_state(); + service_status->controls_accepted = SVCCTL_ACCEPT_STOP; + return WERR_OK; } |