summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/torture/util.c b/source4/torture/util.c
index 5546e513cf..119a3c1730 100644
--- a/source4/torture/util.c
+++ b/source4/torture/util.c
@@ -27,13 +27,13 @@
/**
create a temporary directory.
*/
-_PUBLIC_ NTSTATUS torture_temp_dir(TALLOC_CTX *mem_ctx, const char *prefix,
+_PUBLIC_ NTSTATUS torture_temp_dir(struct torture_context *tctx,
+ const char *prefix,
char **tempdir)
{
- const char *basedir = lp_parm_string(-1, "torture", "basedir");
- if (basedir == NULL) basedir = ".";
- *tempdir = talloc_asprintf(mem_ctx, "%s/%s.XXXXXX",
- basedir, prefix);
+ const char *basedir = torture_setting_string(tctx, "basedir", ".");
+
+ *tempdir = talloc_asprintf(tctx, "%s/%s.XXXXXX", basedir, prefix);
if (mkdtemp(*tempdir) == NULL)
return NT_STATUS_UNSUCCESSFUL;