a denytest for ntcreatex
*/
static bool torture_ntdenytest(struct torture_context *tctx,
- struct smbcli_state *cli1, struct smbcli_state *cli2, int client)
+ struct smbcli_state *cli1,
+ struct smbcli_state *cli2, int client)
{
const struct bit_value share_access_bits[] = {
{ NTCREATEX_SHARE_ACCESS_READ, "S_R" },
.share_access = 0,
.open_disposition = NTCREATEX_DISP_CREATE,
.create_options = 0,
- .fname = fname,
+ .fname = fname
);
status = smb_raw_open(tree, mem_ctx, &open_parms);
CHECK_STATUS(status, NT_STATUS_OK);
.share_access = sharemode,
.open_disposition = NTCREATEX_DISP_OPEN_IF,
.create_options = NTCREATEX_OPTIONS_DIRECTORY,
- .fname = fname,
+ .fname = fname
);
}
.open_disposition = NTCREATEX_DISP_OPEN_IF,
.create_options = 0,
.fname = fname,
- .root_fid = { .fnum = 0 },
+ .root_fid = { .fnum = 0 }
);
}
.share_access = 0,
.open_disposition = NTCREATEX_DISP_CREATE,
.create_options = 0,
- .fname = CREATEX_NAME "\\" KNOWN,
+ .fname = CREATEX_NAME "\\" KNOWN
);
status = smb_raw_open(tree, mem_ctx, &open_parms);
CHECK_STATUS(status, NT_STATUS_OK);
.open_disposition = NTCREATEX_DISP_CREATE,
.create_options = 0,
.fname = CHILD,
- .root_fid = { .fnum = fnum },
+ .root_fid = { .fnum = fnum }
);
result[CXD_DIR_CREATE_CHILD] =
.open_disposition = NTCREATEX_DISP_OPEN,
.create_options = 0,
.fname = KNOWN,
- .root_fid = {.fnum = fnum},
+ .root_fid = {.fnum = fnum}
);
result[CXD_DIR_TRAVERSE] =
static bool createx_test_file(struct torture_context *tctx,
struct smbcli_tree *tree, int fnum, TALLOC_CTX *mem_ctx, NTSTATUS *result)
{
- union smb_read rd = {};
- union smb_write wr = {};
+ union smb_read rd;
+ union smb_write wr;
char buf[256] = "";
+ memset(&rd, 0, sizeof(rd));
rd.readx.level = RAW_READ_READX;
rd.readx.in.file.fnum = fnum;
rd.readx.in.mincnt = sizeof(buf);
result[CXD_FILE_READ] = smb_raw_read(tree, &rd);
+ memset(&wr, 0, sizeof(wr));
wr.writex.level = RAW_WRITE_WRITEX;
wr.writex.in.file.fnum = fnum;
wr.writex.in.count = sizeof(buf);
struct smbcli_state *cli)
{
struct security_descriptor *sd, *sd_orig;
- union smb_open io = {};
+ union smb_open io;
static TALLOC_CTX *mem_ctx;
int fnum, i;
bool ret = true;
smbcli_unlink(cli->tree, MAXIMUM_ALLOWED_FILE);
/* create initial file with restrictive SD */
+ memset(&io, 0, sizeof(io));
io.generic.level = RAW_OPEN_NTTRANS_CREATE;
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;