summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-29 17:46:21 +0200
committerAndreas Schneider <asn@samba.org>2011-08-01 11:08:37 +0200
commit538bd1eca6846e3c5a52d792e456f463348527bc (patch)
treebe5cceea7658f66f439bfbb5e78c2037c7c493ce /source3/rpc_server
parentb11878d5a5fb6beb1a393a9ff7da5e5d7e711c6c (diff)
downloadsamba-538bd1eca6846e3c5a52d792e456f463348527bc.tar.gz
samba-538bd1eca6846e3c5a52d792e456f463348527bc.tar.bz2
samba-538bd1eca6846e3c5a52d792e456f463348527bc.zip
s3-rpc_server: Add rpc_spoolss_mode().
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/rpc_service_setup.c23
-rw-r--r--source3/rpc_server/rpc_service_setup.h7
2 files changed, 30 insertions, 0 deletions
diff --git a/source3/rpc_server/rpc_service_setup.c b/source3/rpc_server/rpc_service_setup.c
index dec39ee08a..776c707cce 100644
--- a/source3/rpc_server/rpc_service_setup.c
+++ b/source3/rpc_server/rpc_service_setup.c
@@ -73,6 +73,29 @@ enum rpc_service_mode_e rpc_epmapper_mode(void)
return state;
}
+enum rpc_service_mode_e rpc_spoolss_mode(void)
+{
+ const char *rpcsrv_type;
+ enum rpc_service_mode_e state;
+
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server",
+ "spoolss",
+ "embedded");
+
+ if (strcasecmp_m(rpcsrv_type, "embedded") == 0) {
+ state = RPC_SERVICE_MODE_EMBEDDED;
+ } else if (strcasecmp_m(rpcsrv_type, "external") == 0) {
+ state = RPC_SERVICE_MODE_EXTERNAL;
+ } else if (strcasecmp_m(rpcsrv_type, "daemon") == 0) {
+ state = RPC_SERVICE_MODE_DAEMON;
+ } else {
+ state = RPC_SERVICE_MODE_DISABLED;
+ }
+
+ return state;
+}
+
static bool rpc_setup_epmapper(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx)
{
diff --git a/source3/rpc_server/rpc_service_setup.h b/source3/rpc_server/rpc_service_setup.h
index e568b1fc06..d369b829f5 100644
--- a/source3/rpc_server/rpc_service_setup.h
+++ b/source3/rpc_server/rpc_service_setup.h
@@ -39,6 +39,13 @@ enum rpc_service_mode_e {
enum rpc_service_mode_e rpc_epmapper_mode(void);
/**
+ * @brief Get the mode in which epmapper is started.
+ *
+ * @return The mode.
+ */
+enum rpc_service_mode_e rpc_spoolss_mode(void);
+
+/**
* @brief Register an endpoint at the endpoint mapper.
*
* This just sets up a register and monitor loop to try to regsiter the