summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-21 02:24:07 +0200
committerGünther Deschner <gd@samba.org>2008-10-27 19:33:22 +0100
commit8bcc939a8c2762abaa31029411e5f2d3e1c385f4 (patch)
treefb6cdbc0c9f55d8d1ac87d6251319b0e8aa48b13 /source4/torture/rpc
parentea6b4865ea292e36f7c8b2b645c08886ed50fe2b (diff)
downloadsamba-8bcc939a8c2762abaa31029411e5f2d3e1c385f4.tar.gz
samba-8bcc939a8c2762abaa31029411e5f2d3e1c385f4.tar.bz2
samba-8bcc939a8c2762abaa31029411e5f2d3e1c385f4.zip
s4-lsa: merge lsa_LookupPrivName from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/lsa.c10
-rw-r--r--source4/torture/rpc/samsync.c6
2 files changed, 12 insertions, 4 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 62e0c22ce2..e065c294d9 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -767,9 +767,11 @@ static bool test_LookupPrivName(struct dcerpc_pipe *p,
{
NTSTATUS status;
struct lsa_LookupPrivName r;
+ struct lsa_StringLarge *name = NULL;
r.in.handle = handle;
r.in.luid = luid;
+ r.out.name = &name;
status = dcerpc_lsa_LookupPrivName(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -807,22 +809,24 @@ static bool test_RemovePrivilegesFromAccount(struct dcerpc_pipe *p,
if (!NT_STATUS_IS_OK(status)) {
struct lsa_LookupPrivName r_name;
+ struct lsa_StringLarge *name = NULL;
r_name.in.handle = handle;
r_name.in.luid = luid;
-
+ r_name.out.name = &name;
+
status = dcerpc_lsa_LookupPrivName(p, mem_ctx, &r_name);
if (!NT_STATUS_IS_OK(status)) {
printf("\nLookupPrivName failed - %s\n", nt_errstr(status));
return false;
}
/* Windows 2008 does not allow this to be removed */
- if (strcmp("SeAuditPrivilege", r_name.out.name->string) == 0) {
+ if (strcmp("SeAuditPrivilege", name->string) == 0) {
return ret;
}
printf("RemovePrivilegesFromAccount failed to remove %s - %s\n",
- r_name.out.name->string,
+ name->string,
nt_errstr(status));
return false;
}
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 26660921a4..14c05b2c05 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -1073,8 +1073,12 @@ static bool samsync_handle_account(TALLOC_CTX *mem_ctx, struct samsync_state *sa
TEST_INT_EQUAL(account->privilege_entries, privs->count);
for (i=0;i< privs->count; i++) {
+
+ struct lsa_StringLarge *name = NULL;
+
r.in.handle = samsync_state->lsa_handle;
r.in.luid = &privs->set[i].luid;
+ r.out.name = &name;
status = dcerpc_lsa_LookupPrivName(samsync_state->p_lsa, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -1087,7 +1091,7 @@ static bool samsync_handle_account(TALLOC_CTX *mem_ctx, struct samsync_state *sa
return false;
}
for (j=0;j<account->privilege_entries; j++) {
- if (strcmp(r.out.name->string, account->privilege_name[j].string) == 0) {
+ if (strcmp(name->string, account->privilege_name[j].string) == 0) {
found_priv_in_lsa[j] = true;
break;
}