summaryrefslogtreecommitdiff
path: root/source3/rpc_server/rpc_service_setup.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-29 11:44:02 +0200
committerAndreas Schneider <asn@samba.org>2011-08-01 11:08:36 +0200
commit176ce4b42f6629fe33a2ff51b3c70bb74c109637 (patch)
tree3f1a09483dce5ffe423336ea8f13227cc2ba29da /source3/rpc_server/rpc_service_setup.c
parent9c5f2ec12136eac5ede41ccef581b2bf934429ca (diff)
downloadsamba-176ce4b42f6629fe33a2ff51b3c70bb74c109637.tar.gz
samba-176ce4b42f6629fe33a2ff51b3c70bb74c109637.tar.bz2
samba-176ce4b42f6629fe33a2ff51b3c70bb74c109637.zip
s3-rpc_server: Add rpc_epmapper_mode().
Diffstat (limited to 'source3/rpc_server/rpc_service_setup.c')
-rw-r--r--source3/rpc_server/rpc_service_setup.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/rpc_server/rpc_service_setup.c b/source3/rpc_server/rpc_service_setup.c
index a9633fb355..6cf4905af7 100644
--- a/source3/rpc_server/rpc_service_setup.c
+++ b/source3/rpc_server/rpc_service_setup.c
@@ -52,6 +52,27 @@
#include "rpc_server/rpc_server.h"
#include "rpc_server/epmapper/srv_epmapper.h"
+enum rpc_service_mode_e rpc_epmapper_mode(void)
+{
+ const char *rpcsrv_type;
+ enum rpc_service_mode_e state;
+
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server",
+ "epmapper",
+ "disabled");
+
+ 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)
{