summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/raw/open.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index e37fd8e09a..42f693e78c 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -1787,17 +1787,9 @@ done:
return ret;
}
-#define FILL_NTCREATEX(_struct, _init...) \
- do { \
- (_struct)->generic.level = RAW_OPEN_NTCREATEX; \
- (_struct)->ntcreatex.in \
- = (typeof((_struct)->ntcreatex.in)) {_init};\
- } while (0)
-
static bool test_ntcreatex_opendisp_dir(struct torture_context *tctx,
struct smbcli_state *cli)
{
- union smb_open io;
const char *dname = BASEDIR "\\torture_ntcreatex_opendisp_dir";
NTSTATUS status;
bool ret = true;
@@ -1822,20 +1814,21 @@ static bool test_ntcreatex_opendisp_dir(struct torture_context *tctx,
{ 6, true, NT_STATUS_INVALID_PARAMETER },
{ 6, false, NT_STATUS_INVALID_PARAMETER },
};
+ union smb_open io;
+
+ ZERO_STRUCT(io);
+ io.generic.level = RAW_OPEN_NTCREATEX;
+ io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
+ io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+ io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_DIRECTORY;
+ io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE;
+ io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
+ io.ntcreatex.in.fname = dname;
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}
- FILL_NTCREATEX(&io,
- .flags = NTCREATEX_FLAGS_EXTENDED,
- .access_mask = SEC_FLAG_MAXIMUM_ALLOWED,
- .file_attr = FILE_ATTRIBUTE_DIRECTORY,
- .share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE,
- .create_options = NTCREATEX_OPTIONS_DIRECTORY,
- .fname = dname,
- );
-
smbcli_rmdir(cli->tree, dname);
smbcli_unlink(cli->tree, dname);