summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/testjoin.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-02-13 00:02:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:55 -0500
commit358122c688518ffce389644b1c3b4a33e2c24c50 (patch)
tree5ee948ea65336b109a2e219801199e084694a3d6 /source4/torture/rpc/testjoin.c
parente7630ebe47384328d6a4a44297cbd7d4f4ec8313 (diff)
downloadsamba-358122c688518ffce389644b1c3b4a33e2c24c50.tar.gz
samba-358122c688518ffce389644b1c3b4a33e2c24c50.tar.bz2
samba-358122c688518ffce389644b1c3b4a33e2c24c50.zip
r13479: Return the joined domain SID and user SID as structures, not strings.
Andrew Bartlett (This used to be commit e1de45bce47292eef1f9c56ea5576c0436e6151d)
Diffstat (limited to 'source4/torture/rpc/testjoin.c')
-rw-r--r--source4/torture/rpc/testjoin.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 39634b9186..28a78b1fc0 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -40,7 +40,8 @@ struct test_join {
struct dcerpc_pipe *p;
struct policy_handle user_handle;
struct libnet_JoinDomain *libnet_r;
- const char *dom_sid;
+ struct dom_sid *dom_sid;
+ struct dom_sid *user_sid;
};
@@ -161,7 +162,8 @@ struct test_join *torture_create_testuser(const char *username,
goto failed;
}
- join->dom_sid = dom_sid_string(join, l.out.sid);
+ talloc_steal(join, l.out.sid);
+ join->dom_sid = l.out.sid;
o.in.connect_handle = &handle;
o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
@@ -200,6 +202,8 @@ again:
goto failed;
}
+ join->user_sid = dom_sid_add_rid(join, join->dom_sid, rid);
+
pwp.in.user_handle = &join->user_handle;
status = dcerpc_samr_GetUserPwInfo(join->p, join, &pwp);
@@ -330,7 +334,8 @@ struct test_join *torture_join_domain(const char *machine_name,
}
tj->p = libnet_r->out.samr_pipe;
tj->user_handle = *libnet_r->out.user_handle;
- tj->dom_sid = dom_sid_string(tj, libnet_r->out.domain_sid);
+ tj->dom_sid = libnet_r->out.domain_sid;
+ talloc_steal(tj, libnet_r->out.domain_sid);
ZERO_STRUCT(u);
s.in.user_handle = &tj->user_handle;
@@ -354,11 +359,6 @@ struct test_join *torture_join_domain(const char *machine_name,
printf("SetUserInfo (non-critical) failed - %s\n", nt_errstr(status));
}
- DEBUG(0, ("%s joined domain %s (%s).\n",
- libnet_r->in.netbios_name,
- libnet_r->out.domain_name,
- tj->dom_sid));
-
*machine_credentials = cli_credentials_init(tj);
cli_credentials_set_conf(*machine_credentials);
cli_credentials_set_workstation(*machine_credentials, machine_name, CRED_SPECIFIED);
@@ -489,7 +489,7 @@ void torture_leave_domain(struct test_join *join)
/*
return the dom sid for a test join
*/
-const char *torture_join_sid(struct test_join *join)
+const struct dom_sid *torture_join_sid(struct test_join *join)
{
return join->dom_sid;
}