From 3d5ea8e3e256704947664edcf74d7249e6e4d434 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 10 Mar 2004 09:00:24 +0000 Subject: nicer way of handling \clients (This used to be commit 931138cc440f646671ec5e9b52eb3666b2ff014b) --- source4/torture/nbench/nbench.c | 2 ++ source4/torture/nbench/nbio.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'source4/torture/nbench') diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c index 3a5d9bef70..e437729980 100644 --- a/source4/torture/nbench/nbench.c +++ b/source4/torture/nbench/nbench.c @@ -106,6 +106,8 @@ again: nb_deltree(params[1]); } else if (!strcmp(params[0],"Rmdir")) { nb_rmdir(params[1], status); + } else if (!strcmp(params[0],"Mkdir")) { + nb_mkdir(params[1], status); } else if (!strcmp(params[0],"QUERY_PATH_INFORMATION")) { nb_qpathinfo(params[1], ival(params[2]), status); } else if (!strcmp(params[0],"QUERY_FILE_INFORMATION")) { diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c index d42f719473..6f91457fc4 100644 --- a/source4/torture/nbench/nbio.c +++ b/source4/torture/nbench/nbio.c @@ -215,9 +215,7 @@ void nb_createx(const char *fname, talloc_destroy(mem_ctx); - if (strcmp(fname, "\\clients") != 0) { - check_status("NTCreateX", status, ret); - } + check_status("NTCreateX", status, ret); if (!NT_STATUS_IS_OK(ret)) return; @@ -429,6 +427,17 @@ void nb_rmdir(const char *dname, NTSTATUS status) check_status("Rmdir", status, ret); } +void nb_mkdir(const char *dname, NTSTATUS status) +{ + union smb_mkdir io; + + io.mkdir.level = RAW_MKDIR_MKDIR; + io.mkdir.in.path = dname; + + /* NOTE! no error checking. Used for base fileset creation */ + smb_raw_mkdir(c->tree, &io); +} + void nb_rename(const char *old, const char *new, NTSTATUS status) { NTSTATUS ret; -- cgit