summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-11-06 10:07:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:33 -0500
commit6c3a5b30e9d42d832f4c68211c5f46a096803591 (patch)
tree1586a26e3797f62150cc694b420e037fece87770 /source4/torture/rpc
parent44b5e5a580a916d4cfafe754148c6ae0c0750920 (diff)
downloadsamba-6c3a5b30e9d42d832f4c68211c5f46a096803591.tar.gz
samba-6c3a5b30e9d42d832f4c68211c5f46a096803591.tar.bz2
samba-6c3a5b30e9d42d832f4c68211c5f46a096803591.zip
r3577: add a torture_join_domain_ads_dc() function,
which will join as a w2k dc joins a ads domain (this is currently not fully implmented, I just have listed the steps we need to do) metze (This used to be commit 29cd3d20e39766455e488c6e240228d8815bd36b)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/testjoin.c94
1 files changed, 94 insertions, 0 deletions
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 604c8e5267..e592af3c5e 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -270,3 +270,97 @@ void torture_leave_domain(void *join_ctx)
talloc_free(join);
}
+
+
+struct test_join_ads_dc {
+ struct test_join *join;
+};
+
+void *torture_join_domain_ads_dc(const char *machine_name,
+ const char *domain,
+ const char **machine_password)
+{
+ struct test_join_ads_dc *join;
+
+ join = talloc_p(NULL, struct test_join_ads_dc);
+ if (join == NULL) {
+ return NULL;
+ }
+
+ join->join = torture_join_domain(machine_name, domain,
+ ACB_SVRTRUST,
+ machine_password);
+
+ if (!join->join) {
+ return NULL;
+ }
+
+ /* do netlogon DrsEnumerateDomainTrusts */
+
+ /* modify userAccountControl from 4096 to 532480 */
+
+ /* modify RDN to OU=Domain Controllers and skip the $ from server name */
+
+ /* ask objectVersion of Schema Partition */
+
+ /* ask rIDManagerReferenz of the Domain Partition */
+
+ /* ask fsMORoleOwner of the RID-Manager$ object
+ * returns CN=NTDS Settings,CN=<DC>,CN=Servers,CN=Default-First-Site-Name, ...
+ */
+
+ /* ask for dnsHostName of CN=<DC>,CN=Servers,CN=Default-First-Site-Name, ... */
+
+ /* ask for objectGUID of CN=NTDS Settings,CN=<DC>,CN=Servers,CN=Default-First-Site-Name, ... */
+
+ /* ask for * of CN=Default-First-Site-Name, ... */
+
+ /* search (&(|(objectClass=user)(objectClass=computer))(sAMAccountName=<machine_name>$)) in Domain Partition
+ * attributes : distinguishedName, userAccountControl
+ */
+
+ /* ask * for CN=<machine_name>,CN=Servers,CN=Default-First-Site-Name,...
+ * should fail with noSuchObject
+ */
+
+ /* add CN=<machine_name>,CN=Servers,CN=Default-First-Site-Name,...
+ *
+ * objectClass = server
+ * systemFlags = 50000000
+ * serverReferenz = CN=<machine_name>,OU=Domain Controllers,...
+ */
+
+ /* ask for * of CN=NTDS Settings,CN=<machine_name>,CN=Servers,CN=Default-First-Site-Name, ...
+ * should fail with noSuchObject
+ */
+
+ /* search for (ncname=<domain_nc>) in CN=Partitions,CN=Configuration,...
+ * attributes: ncName, dnsRoot
+ */
+
+ /* modify add CN=<machine_name>,CN=Servers,CN=Default-First-Site-Name,...
+ * serverReferenz = CN=<machine_name>,OU=Domain Controllers,...
+ * should fail with attributeOrValueExists
+ */
+
+ /* modify replace CN=<machine_name>,CN=Servers,CN=Default-First-Site-Name,...
+ * serverReferenz = CN=<machine_name>,OU=Domain Controllers,...
+ */
+
+ /* DsReplicaAdd to create the CN=NTDS Settings,CN=<machine_name>,CN=Servers,CN=Default-First-Site-Name, ...
+ * needs to be tested
+ */
+
+ return join;
+}
+
+void torture_leave_domain_ads_dc(void *join_ctx)
+{
+ struct test_join_ads_dc *join = join_ctx;
+
+ if (join->join) {
+ torture_leave_domain(join->join);
+ }
+
+ talloc_free(join);
+}