From 19a88e32cbe7df4897b76598cac070256a916d12 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Mon, 21 Aug 2006 21:03:28 +0000 Subject: r17671: Update the tests according to changes in libnet context. rafal (This used to be commit 9e7709de62ccb66d312e985fa0846b1004e77d32) --- source4/torture/libnet/domain.c | 4 ++-- source4/torture/libnet/libnet_user.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'source4') diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c index c3e965f137..991fe8e51a 100644 --- a/source4/torture/libnet/domain.c +++ b/source4/torture/libnet/domain.c @@ -88,7 +88,7 @@ BOOL torture_domainopen(struct torture_context *torture) net_ctx = libnet_context_init(evt_ctx); status = torture_rpc_connection(mem_ctx, - &net_ctx->samr_pipe, + &net_ctx->samr.pipe, &dcerpc_table_samr); if (!NT_STATUS_IS_OK(status)) { @@ -105,7 +105,7 @@ BOOL torture_domainopen(struct torture_context *torture) goto done; } - if (!test_cleanup(net_ctx->samr_pipe, mem_ctx, &h)) { + if (!test_cleanup(net_ctx->samr.pipe, mem_ctx, &h)) { ret = False; goto done; } diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c index a91587466b..fca73a2977 100644 --- a/source4/torture/libnet/libnet_user.c +++ b/source4/torture/libnet/libnet_user.c @@ -227,7 +227,7 @@ BOOL torture_createuser(struct torture_context *torture) return False; } - if (!test_cleanup(ctx->samr_pipe, mem_ctx, &ctx->domain.handle, TEST_USERNAME)) { + if (!test_cleanup(ctx->samr.pipe, mem_ctx, &ctx->samr.handle, TEST_USERNAME)) { printf("cleanup failed\n"); return False; } @@ -313,7 +313,6 @@ static void set_test_changes(TALLOC_CTX *mem_ctx, struct libnet_ModifyUser *r, i comment, logon_script, profile_path, acct_expiry, allow_password_change, force_password_change, last_logon, last_logoff, last_password_change }; const int num_fields = 14; - const char* logon_scripts[] = { "start_login.cmd", "login.bat", "start.cmd" }; const char* home_dirs[] = { "\\\\srv\\home", "\\\\homesrv\\home\\user", "\\\\pdcsrv\\domain" }; const char* home_drives[] = { "H:", "z:", "I:", "J:", "n:" }; @@ -486,11 +485,13 @@ BOOL torture_modifyuser(struct torture_context *torture) } ZERO_STRUCT(req); - req.in.user_name = TEST_USERNAME; req.in.domain_name = lp_workgroup(); - + req.in.user_name = TEST_USERNAME; + printf("Testing change of a single field\n"); set_test_changes(mem_ctx, &req, 1); + + req.in.account_name = "newlibnetuser"; status = libnet_ModifyUser(ctx, mem_ctx, &req); if (!NT_STATUS_IS_OK(status)) { @@ -498,7 +499,7 @@ BOOL torture_modifyuser(struct torture_context *torture) return False; } - if (!test_cleanup(ctx->samr_pipe, mem_ctx, &ctx->domain.handle, TEST_USERNAME)) { + if (!test_cleanup(ctx->samr.pipe, mem_ctx, &ctx->samr.handle, TEST_USERNAME)) { printf("cleanup failed\n"); return False; } -- cgit