mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r23672: Allow msrpc_name_to_sid() to be called without a domain_name and just a name.
Guenther
This commit is contained in:
parent
25f3bfdb1f
commit
eeed62b6ca
@ -269,11 +269,11 @@ NTSTATUS msrpc_name_to_sid(struct winbindd_domain *domain,
|
||||
struct rpc_pipe_client *cli;
|
||||
POLICY_HND lsa_policy;
|
||||
|
||||
if(name == NULL || *name=='\0') {
|
||||
DEBUG(3,("rpc: name_to_sid name=%s\n", domain_name));
|
||||
if (name == NULL || *name=='\0') {
|
||||
full_name = talloc_asprintf(mem_ctx, "%s", domain_name);
|
||||
} else if (domain_name == NULL || *domain_name == '\0') {
|
||||
full_name = talloc_asprintf(mem_ctx, "%s", name);
|
||||
} else {
|
||||
DEBUG(3,("rpc: name_to_sid name=%s\\%s\n", domain_name, name));
|
||||
full_name = talloc_asprintf(mem_ctx, "%s\\%s", domain_name, name);
|
||||
}
|
||||
if (!full_name) {
|
||||
@ -281,6 +281,8 @@ NTSTATUS msrpc_name_to_sid(struct winbindd_domain *domain,
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
DEBUG(3,("rpc: name_to_sid name=%s\n", full_name));
|
||||
|
||||
ws_name_return( full_name, WB_REPLACE_CHAR );
|
||||
|
||||
DEBUG(3,("name_to_sid [rpc] %s for domain %s\n", full_name?full_name:"", domain_name ));
|
||||
|
Loading…
Reference in New Issue
Block a user