From 0bf72b6e330a76bee502cb36c1cb80c46d47d33c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 6 Oct 2005 17:48:03 +0000 Subject: r10781: merging eventlog and svcctl code from trunk (This used to be commit f10aa9fb84bfac4f1a22b74d63999668700ffaac) --- source3/services/svc_wins.c | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 source3/services/svc_wins.c (limited to 'source3/services/svc_wins.c') diff --git a/source3/services/svc_wins.c b/source3/services/svc_wins.c new file mode 100644 index 0000000000..3a4650664d --- /dev/null +++ b/source3/services/svc_wins.c @@ -0,0 +1,66 @@ +/* + * Unix SMB/CIFS implementation. + * Service Control API Implementation + * Copyright (C) Gerald Carter 2005. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "includes.h" + +/* Implementation for internal wins service */ + +/********************************************************************* +*********************************************************************/ + +static WERROR wins_stop( const char *service, SERVICE_STATUS *service_status ) +{ + return WERR_ACCESS_DENIED; +} + +/********************************************************************* +*********************************************************************/ + +static WERROR wins_start( const char *service ) +{ + return WERR_ACCESS_DENIED; +} + +/********************************************************************* +*********************************************************************/ + +static WERROR wins_status( const char *service, SERVICE_STATUS *service_status ) +{ + 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; +} + +/********************************************************************* +*********************************************************************/ + +/* struct for svcctl control to manipulate wins service */ + +SERVICE_CONTROL_OPS wins_svc_ops = { + wins_stop, + wins_start, + wins_status +}; -- cgit From a48955306705ac7f045e3726d7097900550bebe3 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 11 Dec 2005 04:21:34 +0000 Subject: 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) --- source3/services/svc_wins.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'source3/services/svc_wins.c') 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; } /********************************************************************* -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/services/svc_wins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/services/svc_wins.c') diff --git a/source3/services/svc_wins.c b/source3/services/svc_wins.c index 37cfc99c06..0c2996559d 100644 --- a/source3/services/svc_wins.c +++ b/source3/services/svc_wins.c @@ -5,7 +5,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- cgit From 153cfb9c83534b09f15cc16205d7adb19b394928 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 05:23:25 +0000 Subject: r23801: The FSF has moved around a lot. This fixes their Mass Ave address. (This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227) --- source3/services/svc_wins.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/services/svc_wins.c') diff --git a/source3/services/svc_wins.c b/source3/services/svc_wins.c index 0c2996559d..c9ef5e5b51 100644 --- a/source3/services/svc_wins.c +++ b/source3/services/svc_wins.c @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program; if not, see . */ #include "includes.h" -- cgit