r24083: Don't fail the test (looking for the user in the enum) if we didn't
authorAndrew Bartlett <abartlet@samba.org>
Mon, 30 Jul 2007 10:43:50 +0000 (10:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:01:24 +0000 (15:01 -0500)
create the user in the first place.

Andrew Bartlett
(This used to be commit db0f81734d39b228dbfcf53b911edf83a2a2fd8c)

source4/torture/rpc/samr.c

index aef75ea78a24458ac19aef489117c3b9fc24f950..8545df76ea291a52a767208b3eda7c472468ed4e 100644 (file)
@@ -3405,9 +3405,13 @@ static BOOL test_QueryDisplayInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                                ret = False;
                        }
                        if (!seen_testuser) {
-                               printf("Didn't find test user " TEST_ACCOUNT_NAME " in enumeration of %s\n", 
-                                      dom_info.out.info->info2.domain_name.string);
-                               ret = False;
+                               struct policy_handle user_handle;
+                               if (NT_STATUS_IS_OK(test_OpenUser_byname(p, mem_ctx, handle, TEST_ACCOUNT_NAME, &user_handle))) {
+                                       printf("Didn't find test user " TEST_ACCOUNT_NAME " in enumeration of %s\n", 
+                                              dom_info.out.info->info2.domain_name.string);
+                                       ret = False;
+                                       test_samr_handle_Close(p, mem_ctx, &user_handle);
+                               }
                        }
                        break;
                case 3: