summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-08-07 20:30:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:26 -0500
commit1ef10c575d47fec486923d0570b0dc0d718b92a0 (patch)
tree662a1a530b92be146c1028e0aa596f92a001064d /source4
parent84f8d208eff81ed055bd82542bc6bd753659a4c1 (diff)
downloadsamba-1ef10c575d47fec486923d0570b0dc0d718b92a0.tar.gz
samba-1ef10c575d47fec486923d0570b0dc0d718b92a0.tar.bz2
samba-1ef10c575d47fec486923d0570b0dc0d718b92a0.zip
r17449: Add another field to the test before expanding the whole test
to more complex form. rafal (This used to be commit e68e296cbea5d2a40b56f6dd7d60410e0306b838)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/libnet/libnet_user.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c
index a611480d9f..2e7a850903 100644
--- a/source4/torture/libnet/libnet_user.c
+++ b/source4/torture/libnet/libnet_user.c
@@ -296,6 +296,7 @@ BOOL torture_modifyuser(struct torture_context *torture)
{
NTSTATUS status;
const char *binding;
+ struct dcerpc_binding *bind;
struct dcerpc_pipe *p;
TALLOC_CTX *prep_mem_ctx, *mem_ctx;
struct policy_handle h;
@@ -303,6 +304,7 @@ BOOL torture_modifyuser(struct torture_context *torture)
const char *name = TEST_USERNAME;
struct libnet_context *ctx;
struct libnet_ModifyUser req;
+ struct timeval allow_pass_chg;
BOOL ret = True;
prep_mem_ctx = talloc_init("prepare test_deleteuser");
@@ -331,10 +333,21 @@ BOOL torture_modifyuser(struct torture_context *torture)
mem_ctx = talloc_init("test_modifyuser");
+ status = dcerpc_parse_binding(mem_ctx, binding, &bind);
+ if (!NT_STATUS_IS_OK(status)) {
+ ret = False;
+ goto done;
+ }
+
ZERO_STRUCT(req);
req.in.user_name = TEST_USERNAME;
req.in.domain_name = lp_workgroup();
req.in.account_name = TEST_CHANGEDUSERNAME;
+ req.in.logon_script = "start_login.cmd";
+
+ if (gettimeofday(&allow_pass_chg, NULL) == 0) {
+ req.in.allow_password_change = &allow_pass_chg;
+ }
status = libnet_ModifyUser(ctx, mem_ctx, &req);
if (!NT_STATUS_IS_OK(status)) {