mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s4:rpc-server: fix lsa_lookupsids return value for the domain sid
We currently return type UNKNOWN and copy the domain sid to the name. Instead we should return type DOMAIN and return NULL as name. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 13 13:34:16 CET 2013 on sn-devel-104
This commit is contained in:
parent
29d8edfe43
commit
1c9c2e3b65
@ -531,6 +531,16 @@ static NTSTATUS dcesrv_lsa_lookup_sid(struct lsa_policy_state *state, TALLOC_CTX
|
||||
return status;
|
||||
}
|
||||
|
||||
if (dom_sid_equal(state->domain_sid, sid)) {
|
||||
*authority_name = talloc_strdup(mem_ctx, state->domain_name);
|
||||
if (*authority_name == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
*name = NULL;
|
||||
*rtype = SID_NAME_DOMAIN;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
if (dom_sid_in_domain(state->domain_sid, sid)) {
|
||||
*authority_name = talloc_strdup(mem_ctx, state->domain_name);
|
||||
if (*authority_name == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user