summaryrefslogtreecommitdiff
path: root/source4/libcli/util/clilsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/util/clilsa.c')
-rw-r--r--source4/libcli/util/clilsa.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/libcli/util/clilsa.c b/source4/libcli/util/clilsa.c
index 43f64186c3..16967d73b0 100644
--- a/source4/libcli/util/clilsa.c
+++ b/source4/libcli/util/clilsa.c
@@ -202,6 +202,7 @@ NTSTATUS smblsa_lookup_sid(struct smbcli_state *cli,
struct lsa_LookupSids r;
struct lsa_TransNameArray names;
struct lsa_SidArray sids;
+ struct lsa_RefDomainList *domains = NULL;
uint32_t count = 1;
NTSTATUS status;
struct dom_sid *sid;
@@ -231,6 +232,7 @@ NTSTATUS smblsa_lookup_sid(struct smbcli_state *cli,
r.in.count = &count;
r.out.count = &count;
r.out.names = &names;
+ r.out.domains = &domains;
status = dcerpc_lsa_LookupSids(cli->lsa->pipe, mem_ctx2, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -243,7 +245,7 @@ NTSTATUS smblsa_lookup_sid(struct smbcli_state *cli,
}
(*name) = talloc_asprintf(mem_ctx, "%s\\%s",
- r.out.domains->domains[0].name.string,
+ domains->domains[0].name.string,
names.names[0].name.string);
talloc_free(mem_ctx2);
@@ -262,6 +264,7 @@ NTSTATUS smblsa_lookup_name(struct smbcli_state *cli,
struct lsa_LookupNames r;
struct lsa_TransSidArray sids;
struct lsa_String names;
+ struct lsa_RefDomainList *domains = NULL;
uint32_t count = 1;
NTSTATUS status;
struct dom_sid *sid;
@@ -286,6 +289,7 @@ NTSTATUS smblsa_lookup_name(struct smbcli_state *cli,
r.in.count = &count;
r.out.count = &count;
r.out.sids = &sids;
+ r.out.domains = &domains;
status = dcerpc_lsa_LookupNames(cli->lsa->pipe, mem_ctx2, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -297,7 +301,7 @@ NTSTATUS smblsa_lookup_name(struct smbcli_state *cli,
return NT_STATUS_UNSUCCESSFUL;
}
- sid = r.out.domains->domains[0].sid;
+ sid = domains->domains[0].sid;
rid = sids.sids[0].rid;
(*sid_str) = talloc_asprintf(mem_ctx, "%s-%u",