s4-torture: Add torture_delete_testuser().
authorAndreas Schneider <asn@samba.org>
Fri, 23 Sep 2011 14:57:25 +0000 (16:57 +0200)
committerAndreas Schneider <asn@samba.org>
Thu, 27 Oct 2011 15:09:50 +0000 (17:09 +0200)
source4/torture/rpc/testjoin.c

index 66342a2727114c286360a78ecdfe7069190d2148..48408ed5c169d1649800e71e2a5a1a1824646271 100644 (file)
@@ -404,6 +404,20 @@ struct test_join *torture_create_testuser(struct torture_context *torture,
        return torture_create_testuser_max_pwlen(torture, username, domain, acct_type, random_password, 255);
 }
 
+NTSTATUS torture_delete_testuser(struct torture_context *torture,
+                                struct test_join *join,
+                                const char *username)
+{
+       NTSTATUS status;
+
+       status = DeleteUser_byname(join->p->binding_handle,
+                                  torture,
+                                  &join->domain_handle,
+                                  username);
+
+       return status;
+}
+
 _PUBLIC_ struct test_join *torture_join_domain(struct torture_context *tctx,
                                               const char *machine_name, 
                                      uint32_t acct_flags,