diff options
author | Simo Sorce <idra@samba.org> | 2011-08-10 16:17:44 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-08-21 09:05:03 -0400 |
commit | d1bc22eeb3acb35ef5c27d0916a45882fa5ab6e4 (patch) | |
tree | 8f6989932fcd0655f7856ddea5116744cd8ca551 /source3 | |
parent | 32a53be1a4587a72ffe35d8cfd3a97c425a36470 (diff) | |
download | samba-d1bc22eeb3acb35ef5c27d0916a45882fa5ab6e4.tar.gz samba-d1bc22eeb3acb35ef5c27d0916a45882fa5ab6e4.tar.bz2 samba-d1bc22eeb3acb35ef5c27d0916a45882fa5ab6e4.zip |
s3-rpc_server: Use rpc_epmapper_mode() in ep_register()
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/librpc/rpc/dcerpc_ep.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c index 336ff878e1..bb080c5fdd 100644 --- a/source3/librpc/rpc/dcerpc_ep.c +++ b/source3/librpc/rpc/dcerpc_ep.c @@ -25,6 +25,7 @@ #include "auth.h" #include "rpc_server/rpc_ncacn_np.h" #include "../lib/tsocket/tsocket.h" +#include "rpc_server/rpc_config.h" #define EPM_MAX_ANNOTATION_SIZE 64 @@ -305,7 +306,7 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx, struct dcerpc_binding_handle *h; struct pipe_auth_data *auth; const char *ncalrpc_sock; - const char *rpcsrv_type; + enum rpc_service_mode_e epmd_mode; struct epm_entry_t *entries; uint32_t num_ents, i; TALLOC_CTX *tmp_ctx; @@ -325,11 +326,9 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM, - "rpc_server", "epmapper", - "none"); + epmd_mode = rpc_epmapper_mode(); - if (strcasecmp_m(rpcsrv_type, "embedded") == 0) { + if (epmd_mode == RPC_SERVICE_MODE_EMBEDDED) { struct tsocket_address *local; int rc; @@ -353,7 +352,7 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx, "epmapper (%s)", nt_errstr(status))); goto done; } - } else if (strcasecmp_m(rpcsrv_type, "daemon") == 0) { + } else if (epmd_mode == RPC_SERVICE_MODE_EXTERNAL) { /* Connect to the endpoint mapper locally */ ncalrpc_sock = talloc_asprintf(tmp_ctx, "%s/%s", |