summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-26 12:41:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:05 -0500
commite3e794d1a9df40fd171f13318b4a7c51d48d90e5 (patch)
treebd24db18b536af379576b06803943280673ab97d
parent0f7f08565ce307c7bd8dbbb748ae445e894576a1 (diff)
downloadsamba-e3e794d1a9df40fd171f13318b4a7c51d48d90e5.tar.gz
samba-e3e794d1a9df40fd171f13318b4a7c51d48d90e5.tar.bz2
samba-e3e794d1a9df40fd171f13318b4a7c51d48d90e5.zip
r8781: - fixed a memory leak in BASE-SECLEAK (ironic, isn't it). There is
another leak in the ASN.1 code that andrew has volunteered to look at - make the timelimit controllable with -t (This used to be commit 227d4d2115e768bbae13db2559d27bf8508aa18d)
-rw-r--r--source4/torture/basic/secleak.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c
index 50d5c40d07..005eb5f213 100644
--- a/source4/torture/basic/secleak.c
+++ b/source4/torture/basic/secleak.c
@@ -36,7 +36,7 @@ static BOOL try_failed_login(struct smbcli_state *cli)
setup.in.capabilities = cli->transport->negotiate.capabilities;
setup.in.workgroup = lp_workgroup();
- setup.in.credentials = cli_credentials_init(NULL);
+ setup.in.credentials = cli_credentials_init(session);
cli_credentials_set_conf(setup.in.credentials);
cli_credentials_set_domain(setup.in.credentials, "INVALID-DOMAIN", CRED_SPECIFIED);
cli_credentials_set_username(setup.in.credentials, "INVALID-USERNAME", CRED_SPECIFIED);
@@ -56,15 +56,17 @@ BOOL torture_sec_leak(void)
{
struct smbcli_state *cli;
time_t t1 = time(NULL);
+ int timelimit = lp_parm_int(-1, "torture", "timelimit", 20);
if (!torture_open_connection(&cli)) {
return False;
}
- while (time(NULL) < t1+20) {
+ while (time(NULL) < t1+timelimit) {
if (!try_failed_login(cli)) {
return False;
}
+ talloc_report(NULL, stdout);
}
return True;