diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-29 10:45:47 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-29 09:55:18 +0000 |
commit | ebe78c444c1220829f34488aa5d7f11437785f54 (patch) | |
tree | d1a573182023131f4beed64d654c16340fcf6768 /source4/rpc_server | |
parent | 45cd2e445d75429fbd84a95ff4a0fa0852279cd3 (diff) | |
download | samba-ebe78c444c1220829f34488aa5d7f11437785f54.tar.gz samba-ebe78c444c1220829f34488aa5d7f11437785f54.tar.bz2 samba-ebe78c444c1220829f34488aa5d7f11437785f54.zip |
s4:samr RPC server - provide the right "ReplicaSourceNodeName"
It's the content of the "domainReplica" attribute if it exists and has only a
meaning on interim/mixed domain function levels (with NT4 dcs).
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 1c4e9ecada..6871572ac1 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -483,9 +483,10 @@ static NTSTATUS dcesrv_samr_info_DomGeneralInformation(struct samr_domain_state struct ldb_message **dom_msgs, struct samr_DomGeneralInformation *info) { - /* FIXME: this has a completely different meaning - * MS-SAMR 2.2.4.1 - ReplicaSourceNodeName */ - info->primary.string = talloc_strdup(mem_ctx, ""); + /* MS-SAMR 2.2.4.1 - ReplicaSourceNodeName: "domainReplica" attribute */ + info->primary.string = ldb_msg_find_attr_as_string(dom_msgs[0], + "domainReplica", + ""); info->force_logoff_time = ldb_msg_find_attr_as_uint64(dom_msgs[0], "forceLogoff", 0x8000000000000000LL); @@ -575,13 +576,14 @@ static NTSTATUS dcesrv_samr_info_DomInfo5(struct samr_domain_state *state, return DomInfo6 */ static NTSTATUS dcesrv_samr_info_DomInfo6(struct samr_domain_state *state, - TALLOC_CTX *mem_ctx, - struct ldb_message **dom_msgs, - struct samr_DomInfo6 *info) + TALLOC_CTX *mem_ctx, + struct ldb_message **dom_msgs, + struct samr_DomInfo6 *info) { - /* FIXME: this has a completely different meaning - * MS-SAMR 2.2.4.1 - ReplicaSourceNodeName */ - info->primary.string = talloc_strdup(mem_ctx, ""); + /* MS-SAMR 2.2.4.1 - ReplicaSourceNodeName: "domainReplica" attribute */ + info->primary.string = ldb_msg_find_attr_as_string(dom_msgs[0], + "domainReplica", + ""); return NT_STATUS_OK; } @@ -740,8 +742,9 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call, case 2: { static const char * const attrs2[] = {"forceLogoff", - "oEMInformation", - "modifiedCount", + "oEMInformation", + "modifiedCount", + "domainReplica", NULL}; attrs = attrs2; break; @@ -767,7 +770,8 @@ static NTSTATUS dcesrv_samr_QueryDomainInfo(struct dcesrv_call_state *dce_call, } case 6: { - static const char * const attrs2[] = { NULL }; + static const char * const attrs2[] = { "domainReplica", + NULL }; attrs = attrs2; break; } |