summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-07 15:27:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:57 -0500
commit766dfed7350dabe35e53ad182e23f89ba5d8c7e5 (patch)
treeb7bdb14b529e57cd45b6db5995cf8f110064e867 /source4
parenta28b67c7337b4b2b753d6bfad1ed16af04744870 (diff)
downloadsamba-766dfed7350dabe35e53ad182e23f89ba5d8c7e5.tar.gz
samba-766dfed7350dabe35e53ad182e23f89ba5d8c7e5.tar.bz2
samba-766dfed7350dabe35e53ad182e23f89ba5d8c7e5.zip
r20065: make it possible to get the dns domain name and netbios domain name
of the join account metze (This used to be commit 45da80888f18f0fe10d1aeb9089a695125b184e1)
Diffstat (limited to 'source4')
-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 1102d8c55b..3369dd5638 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -43,6 +43,8 @@ struct test_join {
struct policy_handle user_handle;
struct libnet_JoinDomain *libnet_r;
struct dom_sid *dom_sid;
+ const char *dom_netbios_name;
+ const char *dom_dns_name;
struct dom_sid *user_sid;
};
@@ -166,6 +168,8 @@ struct test_join *torture_create_testuser(const char *username,
talloc_steal(join, l.out.sid);
join->dom_sid = l.out.sid;
+ join->dom_netbios_name = talloc_strdup(join, domain);
+ if (!join->dom_netbios_name) goto failed;
o.in.connect_handle = &handle;
o.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
@@ -338,6 +342,10 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
tj->user_handle = *libnet_r->out.user_handle;
tj->dom_sid = libnet_r->out.domain_sid;
talloc_steal(tj, libnet_r->out.domain_sid);
+ tj->dom_netbios_name = libnet_r->out.domain_name;
+ talloc_steal(tj, libnet_r->out.domain_name);
+ tj->dom_dns_name = libnet_r->out.realm;
+ talloc_steal(tj, libnet_r->out.realm);
ZERO_STRUCT(u);
s.in.user_handle = &tj->user_handle;
@@ -503,6 +511,16 @@ const struct dom_sid *torture_join_user_sid(struct test_join *join)
return join->user_sid;
}
+const char *torture_join_dom_netbios_name(struct test_join *join)
+{
+ return join->dom_netbios_name;
+}
+
+const char *torture_join_dom_dns_name(struct test_join *join)
+{
+ return join->dom_dns_name;
+}
+
struct test_join_ads_dc {
struct test_join *join;