diff options
author | Gerald Carter <jerry@samba.org> | 2005-10-06 17:48:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:53 -0500 |
commit | 0bf72b6e330a76bee502cb36c1cb80c46d47d33c (patch) | |
tree | 565aaccd5faf27918b3fad5b3ac553cd14cec835 /source3/rpc_server/srv_svcctl_nt.c | |
parent | 6de37ee5f5d015904e650df3112cf725ab0f1cb8 (diff) | |
download | samba-0bf72b6e330a76bee502cb36c1cb80c46d47d33c.tar.gz samba-0bf72b6e330a76bee502cb36c1cb80c46d47d33c.tar.bz2 samba-0bf72b6e330a76bee502cb36c1cb80c46d47d33c.zip |
r10781: merging eventlog and svcctl code from trunk
(This used to be commit f10aa9fb84bfac4f1a22b74d63999668700ffaac)
Diffstat (limited to 'source3/rpc_server/srv_svcctl_nt.c')
-rw-r--r-- | source3/rpc_server/srv_svcctl_nt.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index e8df2acb22..19648f5e78 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -32,10 +32,21 @@ struct service_control_op { SERVICE_CONTROL_OPS *ops; }; -extern SERVICE_CONTROL_OPS spoolss_svc_ops; +#define SVCCTL_NUM_INTERNAL_SERVICES 4 + +/* handle external services */ extern SERVICE_CONTROL_OPS rcinit_svc_ops; + +/* builtin services (see service_db.c and services/svc_*.c */ +extern SERVICE_CONTROL_OPS spoolss_svc_ops; extern SERVICE_CONTROL_OPS netlogon_svc_ops; extern SERVICE_CONTROL_OPS winreg_svc_ops; +extern SERVICE_CONTROL_OPS wins_svc_ops; + +/* make sure this number patches the number of builtin + SERVICE_CONTROL_OPS structure listed above */ + +#define SVCCTL_NUM_INTERNAL_SERVICES 4 struct service_control_op *svcctl_ops; @@ -51,7 +62,7 @@ static struct generic_mapping svc_generic_map = BOOL init_service_op_table( void ) { const char **service_list = lp_svcctl_list(); - int num_services = 3 + str_list_count( service_list ); + int num_services = SVCCTL_NUM_INTERNAL_SERVICES + str_list_count( service_list ); int i; if ( !(svcctl_ops = TALLOC_ARRAY( NULL, struct service_control_op, num_services+1)) ) { @@ -80,6 +91,10 @@ BOOL init_service_op_table( void ) svcctl_ops[i].ops = &winreg_svc_ops; i++; + svcctl_ops[i].name = talloc_strdup( svcctl_ops, "WINS" ); + svcctl_ops[i].ops = &wins_svc_ops; + i++; + /* NULL terminate the array */ svcctl_ops[i].name = NULL; |