s4/test: remove unused code
authorKamen Mazdrashki <kamenim@samba.org>
Wed, 26 May 2010 10:32:13 +0000 (13:32 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Wed, 26 May 2010 11:36:14 +0000 (14:36 +0300)
There is no need anymore to modify samAccountName
of the testing user to original value as test_cleanup()
will spot the right samAccountName to delete

source4/torture/libnet/libnet_user.c

index 677971b43a0e3adb51d2c017c315e8bbbd43d204..879b250c07d8269df0269c28754dfef36e2afd18 100644 (file)
@@ -643,24 +643,6 @@ bool torture_modifyuser(struct torture_context *torture)
                default:
                        break;
                }
-
-               if (fld == acct_name) {
-                       /* restore original testing username - it's useful when test fails
-                          because it prevents from problems with recreating account */
-                       ZERO_STRUCT(req);
-                       req.in.domain_name = lp_workgroup(torture->lp_ctx);
-                       req.in.user_name = name;
-                       req.in.account_name = TEST_USERNAME;
-
-                       status = libnet_ModifyUser(ctx, torture, &req);
-                       if (!NT_STATUS_IS_OK(status)) {
-                               torture_comment(torture, "libnet_ModifyUser call failed: %s\n", nt_errstr(status));
-                               ret = false;
-                               goto done;
-                       }
-
-                       name = talloc_strdup(torture, TEST_USERNAME);
-               }
        }
 
 cleanup: