summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-08-31 16:46:35 +0200
committerAndreas Schneider <asn@samba.org>2011-09-01 14:28:03 +0200
commitae292ed1806474fdbae1aef9776a933316e057bf (patch)
tree0ae7029eba13f762bce7acd3d40f4ae18eb91d9a /source3
parentccaab14ac423025d1c3188c429832533f19479f1 (diff)
downloadsamba-ae292ed1806474fdbae1aef9776a933316e057bf.tar.gz
samba-ae292ed1806474fdbae1aef9776a933316e057bf.tar.bz2
samba-ae292ed1806474fdbae1aef9776a933316e057bf.zip
s3-rpc_server: Handle services with multiple pipe names.
The configuration should only use the default pipe name to configure all of them correctly.
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/rpc_config.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpc_server/rpc_config.c b/source3/rpc_server/rpc_config.c
index a1c639c4c7..3ddc18935d 100644
--- a/source3/rpc_server/rpc_config.c
+++ b/source3/rpc_server/rpc_config.c
@@ -41,20 +41,28 @@ struct rpc_service_defaults {
enum rpc_service_mode_e rpc_service_mode(const char *name)
{
+ const char *pipe_name = name;
const char *rpcsrv_type;
enum rpc_service_mode_e state;
const char *def;
int i;
+ /* Handle pipes with multiple names */
+ if (strcmp(pipe_name, "lsass") == 0) {
+ pipe_name = "lsarpc";
+ } else if (strcmp(pipe_name, "plugplay") == 0) {
+ pipe_name = "ntsvcs";
+ }
+
def = "embedded";
for (i = 0; rpc_service_defaults[i].name; i++) {
- if (strcasecmp_m(name, rpc_service_defaults[i].name) == 0) {
+ if (strcasecmp_m(pipe_name, rpc_service_defaults[i].name) == 0) {
def = rpc_service_defaults[i].def_mode;
}
}
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
- "rpc_server", name, def);
+ "rpc_server", pipe_name, def);
if (strcasecmp_m(rpcsrv_type, "embedded") == 0) {
state = RPC_SERVICE_MODE_EMBEDDED;