summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-27 14:36:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-27 11:29:17 +0200
commit0b57d36ae32cfe3fb2d2517bdaeeb80816ba28ee (patch)
tree848c9c9f653835ba239bcbcf9d83c35d376b4627
parentcb01f6c51ebc206c623dbd1a8f05a760f1d1ca88 (diff)
downloadsamba-0b57d36ae32cfe3fb2d2517bdaeeb80816ba28ee.tar.gz
samba-0b57d36ae32cfe3fb2d2517bdaeeb80816ba28ee.tar.bz2
samba-0b57d36ae32cfe3fb2d2517bdaeeb80816ba28ee.zip
s3-pdbtest: Initialise more elements for testing
If these were left as defaults, they cause issues when the backend (pdb_samba4) returns the internal defaults from the directory, not the defaults from samu_new() Andrew Bartlett
-rw-r--r--source3/torture/pdbtest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/torture/pdbtest.c b/source3/torture/pdbtest.c
index aad66bc0c8..c4c6bb6871 100644
--- a/source3/torture/pdbtest.c
+++ b/source3/torture/pdbtest.c
@@ -390,6 +390,8 @@ int main(int argc, char **argv)
pdb_set_homedir(out, "\\\\torture\\home", PDB_SET);
pdb_set_logon_script(out, "torture_script.cmd", PDB_SET);
+ pdb_set_acct_ctrl(out, ACB_NORMAL, PDB_SET);
+
pdb_get_account_policy(PDB_POLICY_PASSWORD_HISTORY, &history);
if (history * PW_HISTORY_ENTRY_LEN < NT_HASH_LEN) {
buf = (uint8 *)TALLOC(ctx, NT_HASH_LEN);
@@ -423,6 +425,12 @@ int main(int argc, char **argv)
pdb_set_pass_can_change_time(out, time(NULL)+min_age, PDB_SET);
}
+ pdb_set_logon_time(out, time(NULL)-3600, PDB_SET);
+
+ pdb_set_logoff_time(out, time(NULL), PDB_SET);
+
+ pdb_set_kickoff_time(out, time(NULL)+3600, PDB_SET);
+
/* Create account */
if (!NT_STATUS_IS_OK(rv = pdb->add_sam_account(pdb, out))) {
fprintf(stderr, "Error in add_sam_account: %s\n",