diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-12-06 12:15:40 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-12-22 07:27:07 +0100 |
commit | 454aff611596857e80b0388bba0840d96ef73035 (patch) | |
tree | b969dc1dd759244d8b2bc2c48f7f913729d379de | |
parent | cd24ed920ef69d063ac84ccbd8052928fe6cd0e9 (diff) | |
download | samba-454aff611596857e80b0388bba0840d96ef73035.tar.gz samba-454aff611596857e80b0388bba0840d96ef73035.tar.bz2 samba-454aff611596857e80b0388bba0840d96ef73035.zip |
s3-rpc: added "rpc_server:default" config option
this allows the config to specify a default behaviour (embedded,
external or disabled) for unknown pipes. This is needed to allow the
s3 smbd server to redirect unknown pipes to the s4 RPC server when
using s3 smbd as a file server for a s4 DC. If rpc_server:default is
not specified then this change preserves the old behaviour
-rw-r--r-- | source3/rpc_server/rpc_config.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/rpc_server/rpc_config.c b/source3/rpc_server/rpc_config.c index 3ddc18935d..d3a46ddc61 100644 --- a/source3/rpc_server/rpc_config.c +++ b/source3/rpc_server/rpc_config.c @@ -54,10 +54,18 @@ enum rpc_service_mode_e rpc_service_mode(const char *name) pipe_name = "ntsvcs"; } - def = "embedded"; - for (i = 0; rpc_service_defaults[i].name; i++) { - if (strcasecmp_m(pipe_name, rpc_service_defaults[i].name) == 0) { - def = rpc_service_defaults[i].def_mode; + def = lp_parm_const_string(GLOBAL_SECTION_SNUM, + "rpc_server", "default", NULL); + if (def == NULL) { + for (i = 0; rpc_service_defaults[i].name; i++) { + if (strcasecmp_m(pipe_name, rpc_service_defaults[i].name) == 0) { + def = rpc_service_defaults[i].def_mode; + break; + } + } + /* if the default is unspecified then use 'embedded' */ + if (def == NULL) { + def = "embedded"; } } |