diff options
author | Günther Deschner <gd@samba.org> | 2008-10-21 01:20:53 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-10-27 19:33:22 +0100 |
commit | 6a2dabe1a7faae47dce359b77d886a9489b66fcb (patch) | |
tree | 5da6140b3215b205d78fa0e47b7ce38ae1ab4449 /source4/torture/rpc/samba3rpc.c | |
parent | 6131c0d8888c8bc1923794b9b93c1cb44bb071e3 (diff) | |
download | samba-6a2dabe1a7faae47dce359b77d886a9489b66fcb.tar.gz samba-6a2dabe1a7faae47dce359b77d886a9489b66fcb.tar.bz2 samba-6a2dabe1a7faae47dce359b77d886a9489b66fcb.zip |
s4-lsa: merge lsa_GetUserName from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/torture/rpc/samba3rpc.c')
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 85714ace13..25cbb6727d 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -1583,7 +1583,8 @@ static struct dom_sid *whoami(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *lsa; struct lsa_GetUserName r; NTSTATUS status; - struct lsa_StringPointer authority_name_p; + struct lsa_String *authority_name_p = NULL; + struct lsa_String *account_name_p = NULL; struct dom_sid *result; status = pipe_bind_smb(mem_ctx, lp_ctx, tree, "\\pipe\\lsarpc", @@ -1595,12 +1596,14 @@ static struct dom_sid *whoami(TALLOC_CTX *mem_ctx, } r.in.system_name = "\\"; - r.in.account_name = NULL; - authority_name_p.string = NULL; + r.in.account_name = &account_name_p; r.in.authority_name = &authority_name_p; + r.out.account_name = &account_name_p; status = dcerpc_lsa_GetUserName(lsa, mem_ctx, &r); + authority_name_p = *r.out.authority_name; + if (!NT_STATUS_IS_OK(status)) { printf("(%s) GetUserName failed - %s\n", __location__, nt_errstr(status)); @@ -1608,8 +1611,8 @@ static struct dom_sid *whoami(TALLOC_CTX *mem_ctx, return NULL; } - result = name2sid(mem_ctx, lsa, r.out.account_name->string, - r.out.authority_name->string->string); + result = name2sid(mem_ctx, lsa, account_name_p->string, + authority_name_p->string); talloc_free(lsa); return result; |