1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

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
This commit is contained in:
Andrew Bartlett 2012-06-27 14:36:31 +10:00
parent cb01f6c51e
commit 0b57d36ae3

View File

@ -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",