[SCM] Samba Shared Repository - branch master updated -
abc2843481a6cade7306b0beb8e615bf648d0087
Günther Deschner
gd at samba.org
Fri Jan 9 15:32:49 GMT 2009
The branch, master has been updated
via abc2843481a6cade7306b0beb8e615bf648d0087 (commit)
via 9119ed310129529f229aa720e6e48c8713bfa7ab (commit)
via c60569c9b85e12b12adfd990b13f1404d3f468a0 (commit)
from 1b9ae1a6bb771ee16908e66fa35dada514a8f36d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit abc2843481a6cade7306b0beb8e615bf648d0087
Author: Günther Deschner <gd at samba.org>
Date: Fri Jan 9 14:32:39 2009 +0100
s3-svcctl: use pidl defined constants in services implementation.
Guenther
commit 9119ed310129529f229aa720e6e48c8713bfa7ab
Author: Günther Deschner <gd at samba.org>
Date: Fri Jan 9 14:30:56 2009 +0100
s3: re-run make samba3-idl.
Guenther
commit c60569c9b85e12b12adfd990b13f1404d3f468a0
Author: Günther Deschner <gd at samba.org>
Date: Fri Jan 9 14:29:40 2009 +0100
svcctl: add SERVICE_TYPE_INTERACTIVE_PROCESS define.
Guenther
-----------------------------------------------------------------------
Summary of changes:
librpc/gen_ndr/svcctl.h | 1 +
librpc/idl/svcctl.idl | 1 +
source3/services/svc_netlogon.c | 20 ++++++++++----------
source3/services/svc_rcinit.c | 24 ++++++++++++++----------
source3/services/svc_spoolss.c | 34 ++++++++++++++++++----------------
source3/services/svc_winreg.c | 16 ++++++++--------
source3/services/svc_wins.c | 20 ++++++++++----------
7 files changed, 62 insertions(+), 54 deletions(-)
Changeset truncated at 500 lines:
diff --git a/librpc/gen_ndr/svcctl.h b/librpc/gen_ndr/svcctl.h
index 80f906a..328d8ab 100644
--- a/librpc/gen_ndr/svcctl.h
+++ b/librpc/gen_ndr/svcctl.h
@@ -15,6 +15,7 @@
#define SERVICE_TYPE_WIN32_OWN_PROCESS ( 0x10 )
#define SERVICE_TYPE_WIN32_SHARE_PROCESS ( 0x20 )
#define SERVICE_TYPE_WIN32 ( SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS )
+#define SERVICE_TYPE_INTERACTIVE_PROCESS ( 0x100 )
#define SV_TYPE_ALL ( 0xFFFFFFFF )
#define SC_MANAGER_READ_ACCESS ( (SEC_STD_READ_CONTROL|SC_RIGHT_MGR_CONNECT|SC_RIGHT_MGR_ENUMERATE_SERVICE|SC_RIGHT_MGR_QUERY_LOCK_STATUS) )
#define SC_MANAGER_EXECUTE_ACCESS ( SC_MANAGER_READ_ACCESS )
diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl
index 7cc176e..a48eb35 100644
--- a/librpc/idl/svcctl.idl
+++ b/librpc/idl/svcctl.idl
@@ -76,6 +76,7 @@ import "misc.idl", "security.idl";
const int SERVICE_TYPE_WIN32_OWN_PROCESS = 0x10;
const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20;
const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS;
+ const int SERVICE_TYPE_INTERACTIVE_PROCESS = 0x100;
typedef [public,bitmap32bit] bitmap {
SV_TYPE_WORKSTATION = 0x00000001,
diff --git a/source3/services/svc_netlogon.c b/source3/services/svc_netlogon.c
index 2745695..931f774 100644
--- a/source3/services/svc_netlogon.c
+++ b/source3/services/svc_netlogon.c
@@ -1,18 +1,18 @@
-/*
+/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
@@ -28,16 +28,16 @@ static WERROR netlogon_status( const char *service, struct SERVICE_STATUS *servi
{
ZERO_STRUCTP( service_status );
- service_status->type = 0x20;
- service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
+ service_status->type = SERVICE_TYPE_WIN32_SHARE_PROCESS;
+ 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;
+ service_status->state = SVCCTL_RUNNING;
+ service_status->win32_exit_code = WERR_SERVICE_NEVER_STARTED;
}
else
- service_status->state = SVCCTL_STOPPED;
-
+ service_status->state = SVCCTL_STOPPED;
+
return WERR_OK;
}
diff --git a/source3/services/svc_rcinit.c b/source3/services/svc_rcinit.c
index 5e9a546..3f56676 100644
--- a/source3/services/svc_rcinit.c
+++ b/source3/services/svc_rcinit.c
@@ -1,18 +1,18 @@
-/*
+/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
@@ -44,9 +44,11 @@ static WERROR rcinit_stop( const char *service, struct SERVICE_STATUS *status )
SAFE_FREE(command);
ZERO_STRUCTP( status );
- status->type = 0x0020;
- status->state = (ret == 0 ) ? 0x0001 : 0x0004;
- status->controls_accepted = 0x0005;
+
+ status->type = SERVICE_TYPE_WIN32_SHARE_PROCESS;
+ status->state = (ret == 0 ) ? SVCCTL_STOPPED : SVCCTL_RUNNING;
+ status->controls_accepted = SVCCTL_ACCEPT_STOP |
+ SVCCTL_ACCEPT_SHUTDOWN;
return ( ret == 0 ) ? WERR_OK : WERR_ACCESS_DENIED;
}
@@ -105,9 +107,11 @@ static WERROR rcinit_status( const char *service, struct SERVICE_STATUS *status
SAFE_FREE(command);
ZERO_STRUCTP( status );
- status->type = 0x0020;
- status->state = (ret == 0 ) ? 0x0004 : 0x0001;
- status->controls_accepted = 0x0005;
+
+ status->type = SERVICE_TYPE_WIN32_SHARE_PROCESS;
+ status->state = (ret == 0 ) ? SVCCTL_RUNNING : SVCCTL_STOPPED;
+ status->controls_accepted = SVCCTL_ACCEPT_STOP |
+ SVCCTL_ACCEPT_SHUTDOWN;
return WERR_OK;
}
diff --git a/source3/services/svc_spoolss.c b/source3/services/svc_spoolss.c
index 3bf6592..bb2b892 100644
--- a/source3/services/svc_spoolss.c
+++ b/source3/services/svc_spoolss.c
@@ -1,18 +1,18 @@
-/*
+/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
@@ -27,12 +27,13 @@
static WERROR spoolss_stop( const char *service, struct 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;
+ service_status->type = SERVICE_TYPE_INTERACTIVE_PROCESS |
+ SERVICE_TYPE_WIN32_OWN_PROCESS;
+ service_status->state = SVCCTL_STOPPED;
+ service_status->controls_accepted = SVCCTL_ACCEPT_STOP;
DEBUG(6,("spoolss_stop: spooler stopped (not really)\n"));
@@ -45,12 +46,12 @@ static WERROR spoolss_stop( const char *service, struct SERVICE_STATUS *service_
static WERROR spoolss_start( const char *service )
{
/* see if the smb.conf will support this anyways */
-
+
if ( _lp_disable_spoolss() )
return WERR_ACCESS_DENIED;
-
- lp_set_spoolss_state( SVCCTL_RUNNING );
-
+
+ lp_set_spoolss_state( SVCCTL_RUNNING );
+
return WERR_OK;
}
@@ -61,10 +62,11 @@ static WERROR spoolss_status( const char *service, struct SERVICE_STATUS *servic
{
ZERO_STRUCTP( service_status );
- service_status->type = 0x110;
- service_status->state = lp_get_spoolss_state();
- service_status->controls_accepted = SVCCTL_ACCEPT_STOP;
-
+ service_status->type = SERVICE_TYPE_INTERACTIVE_PROCESS |
+ SERVICE_TYPE_WIN32_OWN_PROCESS;
+ service_status->state = lp_get_spoolss_state();
+ service_status->controls_accepted = SVCCTL_ACCEPT_STOP;
+
return WERR_OK;
}
diff --git a/source3/services/svc_winreg.c b/source3/services/svc_winreg.c
index 4976e6d..a8fdea2 100644
--- a/source3/services/svc_winreg.c
+++ b/source3/services/svc_winreg.c
@@ -1,18 +1,18 @@
-/*
+/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
@@ -44,10 +44,10 @@ static WERROR winreg_status( const char *service, struct SERVICE_STATUS *service
{
ZERO_STRUCTP( service_status );
- service_status->type = 0x20;
- service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
- service_status->state = SVCCTL_RUNNING;
-
+ service_status->type = SERVICE_TYPE_WIN32_SHARE_PROCESS;
+ service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
+ service_status->state = SVCCTL_RUNNING;
+
return WERR_OK;
}
diff --git a/source3/services/svc_wins.c b/source3/services/svc_wins.c
index d0b5052..a4242f3 100644
--- a/source3/services/svc_wins.c
+++ b/source3/services/svc_wins.c
@@ -1,18 +1,18 @@
-/*
+/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
@@ -28,16 +28,16 @@ static WERROR wins_status( const char *service, struct SERVICE_STATUS *service_s
{
ZERO_STRUCTP( service_status );
- service_status->type = 0x10;
- service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
+ service_status->type = SERVICE_TYPE_WIN32_OWN_PROCESS;
+ service_status->controls_accepted = SVCCTL_ACCEPT_NONE;
- if ( lp_wins_support() )
+ if ( lp_wins_support() )
service_status->state = SVCCTL_RUNNING;
else {
- service_status->state = SVCCTL_STOPPED;
- service_status->win32_exit_code = WERR_SERVICE_NEVER_STARTED;
+ service_status->state = SVCCTL_STOPPED;
+ service_status->win32_exit_code = WERR_SERVICE_NEVER_STARTED;
}
-
+
return WERR_OK;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list