summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/testjoin.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-12-11 23:59:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:08 -0500
commit334f78d206d37cbb5863af38cb5160d69fcd9183 (patch)
treebf3fb90b548f927f0bd2fb428590edc8d687d282 /source4/torture/rpc/testjoin.c
parent3cfa1db71db77d94b9bcc98e170b0eb1d00604d2 (diff)
downloadsamba-334f78d206d37cbb5863af38cb5160d69fcd9183.tar.gz
samba-334f78d206d37cbb5863af38cb5160d69fcd9183.tar.bz2
samba-334f78d206d37cbb5863af38cb5160d69fcd9183.zip
r20113: Update the DRSUAPI CrackNames test to explore a few more cases, and in
particular to verify more expected results. Also return more details from the join process. Now we also return the machine account's GUID. Andrew Bartlett (This used to be commit 5b32f102af1fc7acb56bf7eaa40068d60a1ee396)
Diffstat (limited to 'source4/torture/rpc/testjoin.c')
-rw-r--r--source4/torture/rpc/testjoin.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 40192b6ac1..261412cf92 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -46,6 +46,8 @@ struct test_join {
const char *dom_netbios_name;
const char *dom_dns_name;
struct dom_sid *user_sid;
+ struct GUID user_guid;
+ const char *netbios_name;
};
@@ -346,6 +348,12 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
talloc_steal(tj, libnet_r->out.domain_name);
tj->dom_dns_name = libnet_r->out.realm;
talloc_steal(tj, libnet_r->out.realm);
+ tj->user_guid = libnet_r->out.account_guid;
+ tj->netbios_name = talloc_strdup(tj, machine_name);
+ if (!tj->netbios_name) {
+ talloc_free(tj);
+ return NULL;
+ }
ZERO_STRUCT(u);
s.in.user_handle = &tj->user_handle;
@@ -511,6 +519,16 @@ const struct dom_sid *torture_join_user_sid(struct test_join *join)
return join->user_sid;
}
+const char *torture_join_netbios_name(struct test_join *join)
+{
+ return join->netbios_name;
+}
+
+const struct GUID *torture_join_user_guid(struct test_join *join)
+{
+ return &join->user_guid;
+}
+
const char *torture_join_dom_netbios_name(struct test_join *join)
{
return join->dom_netbios_name;