diff options
author | Günther Deschner <gd@samba.org> | 2010-05-20 13:39:46 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-05-20 13:39:46 +0200 |
commit | ba1befd36564cdc580d29be2303d824f9bde6a36 (patch) | |
tree | 4db9727c93500b3f9125faa6c7f5f92f930dc5ee /source3/services | |
parent | e7982bbe0b560dcf37beb3995b5ce8c091a9c21e (diff) | |
download | samba-ba1befd36564cdc580d29be2303d824f9bde6a36.tar.gz samba-ba1befd36564cdc580d29be2303d824f9bde6a36.tar.bz2 samba-ba1befd36564cdc580d29be2303d824f9bde6a36.zip |
s3-services: move services.h closer to services implementation.
Guenther
Diffstat (limited to 'source3/services')
-rw-r--r-- | source3/services/services.h | 52 | ||||
-rw-r--r-- | source3/services/services_db.c | 2 | ||||
-rw-r--r-- | source3/services/svc_netlogon.c | 2 | ||||
-rw-r--r-- | source3/services/svc_rcinit.c | 2 | ||||
-rw-r--r-- | source3/services/svc_spoolss.c | 2 | ||||
-rw-r--r-- | source3/services/svc_winreg.c | 2 | ||||
-rw-r--r-- | source3/services/svc_wins.c | 2 |
7 files changed, 58 insertions, 6 deletions
diff --git a/source3/services/services.h b/source3/services/services.h new file mode 100644 index 0000000000..f746f0c8df --- /dev/null +++ b/source3/services/services.h @@ -0,0 +1,52 @@ +/* + Unix SMB/CIFS implementation. + SMB parameters and setup + Copyright (C) Andrew Tridgell 1992-1997, + Copyright (C) Gerald (Jerry) 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/>. +*/ + +#ifndef _SERVICES_H /* _SERVICES_H */ +#define _SERVICES_H + +/* where we assume the location of the service control scripts */ +#define SVCCTL_SCRIPT_DIR "svcctl" + +/* + * dispatch table of functions to handle the =ServiceControl API + */ + +typedef struct { + /* functions for enumerating subkeys and values */ + WERROR (*stop_service)( const char *service, struct SERVICE_STATUS *status ); + WERROR (*start_service) ( const char *service ); + WERROR (*service_status)( const char *service, struct SERVICE_STATUS *status ); +} SERVICE_CONTROL_OPS; + +/* structure to store the service handle information */ + +typedef struct _ServiceInfo { + uint8 type; + char *name; + uint32 access_granted; + SERVICE_CONTROL_OPS *ops; +} SERVICE_INFO; + +#define SVC_HANDLE_IS_SCM 0x0000001 +#define SVC_HANDLE_IS_SERVICE 0x0000002 +#define SVC_HANDLE_IS_DBLOCK 0x0000003 + +#endif /* _SERICES_H */ + diff --git a/source3/services/services_db.c b/source3/services/services_db.c index 22e39e0e52..daf4f50b77 100644 --- a/source3/services/services_db.c +++ b/source3/services/services_db.c @@ -21,7 +21,7 @@ */ #include "includes.h" -#include "services.h" +#include "services/services.h" #include "registry.h" struct rcinit_file_information { diff --git a/source3/services/svc_netlogon.c b/source3/services/svc_netlogon.c index 41b4f95ca0..582cb56bdd 100644 --- a/source3/services/svc_netlogon.c +++ b/source3/services/svc_netlogon.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "services.h" +#include "services/services.h" /* Implementation for internal netlogon service */ diff --git a/source3/services/svc_rcinit.c b/source3/services/svc_rcinit.c index e19b3d1bff..199e5f12ce 100644 --- a/source3/services/svc_rcinit.c +++ b/source3/services/svc_rcinit.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "services.h" +#include "services/services.h" /********************************************************************* *********************************************************************/ diff --git a/source3/services/svc_spoolss.c b/source3/services/svc_spoolss.c index 2495fb47d1..3b56f9350d 100644 --- a/source3/services/svc_spoolss.c +++ b/source3/services/svc_spoolss.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "services.h" +#include "services/services.h" /* Implementation for internal spoolss service */ diff --git a/source3/services/svc_winreg.c b/source3/services/svc_winreg.c index 0e63e62572..04c137f8dc 100644 --- a/source3/services/svc_winreg.c +++ b/source3/services/svc_winreg.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "services.h" +#include "services/services.h" /* Implementation for internal winreg service */ diff --git a/source3/services/svc_wins.c b/source3/services/svc_wins.c index e1069af2b1..f1e94c5b7e 100644 --- a/source3/services/svc_wins.c +++ b/source3/services/svc_wins.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "services.h" +#include "services/services.h" /* Implementation for internal wins service */ |