summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-05-08 20:55:57 -0700
committerStefan Metzmacher <metze@samba.org>2014-05-09 23:10:07 +0200
commit69e24b4e8bc607806453ab137efda6d6bf74fb12 (patch)
tree3eb182e140ac2b5279d6310e44274efecf2e9290
parent2900dfa5b928ef237e72ac4e15481e083d61750a (diff)
downloadsamba-69e24b4e8bc607806453ab137efda6d6bf74fb12.tar.gz
s3: client : Add extra return parameter to all client open calls.
Add a return parameter of struct smb_create_returns *cr to cli_ntcreate() cli_ntcreate_recv() cli_nttrans_create() cli_nttrans_create_recv() Always pass in NULL for now. This fixes the create API to always fully return the data the server has given back to us on the open file to the caller. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/client/client.c10
-rw-r--r--source3/libsmb/clifile.c29
-rw-r--r--source3/libsmb/cliquota.c2
-rw-r--r--source3/libsmb/clisymlink.c4
-rw-r--r--source3/libsmb/libsmb_xattr.c6
-rw-r--r--source3/libsmb/proto.h14
-rw-r--r--source3/libsmb/pylibsmb.c2
-rw-r--r--source3/torture/nbench.c2
-rw-r--r--source3/torture/nbio.c2
-rw-r--r--source3/torture/test_chain3.c2
-rw-r--r--source3/torture/test_cleanup.c14
-rw-r--r--source3/torture/test_notify.c6
-rw-r--r--source3/torture/test_notify_online.c4
-rw-r--r--source3/torture/test_nttrans_create.c4
-rw-r--r--source3/torture/test_nttrans_fsctl.c2
-rw-r--r--source3/torture/test_posix_append.c2
-rw-r--r--source3/torture/torture.c125
-rw-r--r--source3/torture/utable.c2
-rw-r--r--source3/utils/net_rpc.c3
-rw-r--r--source3/utils/net_rpc_printer.c7
-rw-r--r--source3/utils/smbcacls.c6
21 files changed, 136 insertions, 112 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 9e1f83d3bde..592258ddf43 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -573,7 +573,7 @@ static NTSTATUS display_finfo(struct cli_state *cli_state, struct file_info *fin
status = cli_ntcreate(cli_state, afname, 0,
CREATE_ACCESS_READ, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x0, 0x0, &fnum);
+ FILE_OPEN, 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG( 0, ("display_finfo() Failed to open %s: %s\n",
afname, nt_errstr(status)));
@@ -1772,7 +1772,7 @@ static int do_allinfo(const char *name)
SEC_STD_SYNCHRONIZE, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE
|FILE_SHARE_DELETE,
- FILE_OPEN, 0x0, 0x0, &fnum);
+ FILE_OPEN, 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
/*
* Ignore failure, it does not hurt if we can't list
@@ -2496,12 +2496,12 @@ static int cmd_open(void)
status = cli_ntcreate(targetcli, targetname, 0,
FILE_READ_DATA|FILE_WRITE_DATA, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
- 0x0, 0x0, &fnum);
+ 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
status = cli_ntcreate(targetcli, targetname, 0,
FILE_READ_DATA, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
- 0x0, 0x0, &fnum);
+ 0x0, 0x0, &fnum, NULL);
if (NT_STATUS_IS_OK(status)) {
d_printf("open file %s: for read/write fnum %d\n", targetname, fnum);
} else {
@@ -3943,7 +3943,7 @@ static int cmd_notify(void)
status = cli_ntcreate(
cli, name, 0, FILE_READ_DATA, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum);
+ FILE_OPEN, 0, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not open file: %s\n", nt_errstr(status));
goto fail;
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 424354b9638..bd886eabab9 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1795,6 +1795,7 @@ NTSTATUS cli_nt_delete_on_close(struct cli_state *cli, uint16_t fnum, bool flag)
struct cli_ntcreate_state {
uint16_t vwv[24];
uint16_t fnum;
+ struct smb_create_returns cr;
};
static void cli_ntcreate_done(struct tevent_req *subreq);
@@ -1887,10 +1888,13 @@ static void cli_ntcreate_done(struct tevent_req *subreq)
return;
}
state->fnum = SVAL(vwv+2, 1);
+ /* TODO - fill in state->cr.. */
tevent_req_done(req);
}
-NTSTATUS cli_ntcreate_recv(struct tevent_req *req, uint16_t *pfnum)
+NTSTATUS cli_ntcreate_recv(struct tevent_req *req,
+ uint16_t *pfnum,
+ struct smb_create_returns *cr)
{
struct cli_ntcreate_state *state = tevent_req_data(
req, struct cli_ntcreate_state);
@@ -1900,6 +1904,7 @@ NTSTATUS cli_ntcreate_recv(struct tevent_req *req, uint16_t *pfnum)
return status;
}
*pfnum = state->fnum;
+ /* TODO - fill in *cr.. */
return NT_STATUS_OK;
}
@@ -1912,7 +1917,8 @@ NTSTATUS cli_ntcreate(struct cli_state *cli,
uint32_t CreateDisposition,
uint32_t CreateOptions,
uint8_t SecurityFlags,
- uint16_t *pfid)
+ uint16_t *pfid,
+ struct smb_create_returns *cr)
{
TALLOC_CTX *frame = NULL;
struct tevent_context *ev;
@@ -1929,7 +1935,7 @@ NTSTATUS cli_ntcreate(struct cli_state *cli,
CreateDisposition,
CreateOptions,
pfid,
- NULL);
+ cr);
}
frame = talloc_stackframe();
@@ -1962,7 +1968,7 @@ NTSTATUS cli_ntcreate(struct cli_state *cli,
goto fail;
}
- status = cli_ntcreate_recv(req, pfid);
+ status = cli_ntcreate_recv(req, pfid, cr);
fail:
TALLOC_FREE(frame);
return status;
@@ -1970,6 +1976,7 @@ NTSTATUS cli_ntcreate(struct cli_state *cli,
struct cli_nttrans_create_state {
uint16_t fnum;
+ struct smb_create_returns cr;
};
static void cli_nttrans_create_done(struct tevent_req *subreq);
@@ -2083,11 +2090,14 @@ static void cli_nttrans_create_done(struct tevent_req *subreq)
return;
}
state->fnum = SVAL(param, 2);
+ /* TODO - fill in state->cr.. */
TALLOC_FREE(param);
tevent_req_done(req);
}
-NTSTATUS cli_nttrans_create_recv(struct tevent_req *req, uint16_t *fnum)
+NTSTATUS cli_nttrans_create_recv(struct tevent_req *req,
+ uint16_t *fnum,
+ struct smb_create_returns *cr)
{
struct cli_nttrans_create_state *state = tevent_req_data(
req, struct cli_nttrans_create_state);
@@ -2097,6 +2107,7 @@ NTSTATUS cli_nttrans_create_recv(struct tevent_req *req, uint16_t *fnum)
return status;
}
*fnum = state->fnum;
+ /* TODO - fill in *cr.. */
return NT_STATUS_OK;
}
@@ -2112,7 +2123,8 @@ NTSTATUS cli_nttrans_create(struct cli_state *cli,
struct security_descriptor *secdesc,
struct ea_struct *eas,
int num_eas,
- uint16_t *pfid)
+ uint16_t *pfid,
+ struct smb_create_returns *cr)
{
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
@@ -2141,7 +2153,7 @@ NTSTATUS cli_nttrans_create(struct cli_state *cli,
if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
- status = cli_nttrans_create_recv(req, pfid);
+ status = cli_nttrans_create_recv(req, pfid, cr);
fail:
TALLOC_FREE(frame);
return status;
@@ -2433,7 +2445,8 @@ NTSTATUS cli_open(struct cli_state *cli, const char *fname, int flags,
create_disposition,
create_options,
0,
- pfnum);
+ pfnum,
+ NULL);
/* Try and cope will all varients of "we don't do this call"
and fall back to openX. */
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index 9136506e48c..21dc72e35c9 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -29,7 +29,7 @@ NTSTATUS cli_get_quota_handle(struct cli_state *cli, uint16_t *quota_fnum)
return cli_ntcreate(cli, FAKE_FILE_NAME_QUOTA_WIN32,
0x00000016, DESIRED_ACCESS_PIPE,
0x00000000, FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x00000000, 0x03, quota_fnum);
+ FILE_OPEN, 0x00000000, 0x03, quota_fnum, NULL);
}
void free_ntquota_list(SMB_NTQUOTA_LIST **qt_list)
diff --git a/source3/libsmb/clisymlink.c b/source3/libsmb/clisymlink.c
index 338f932c4e7..eacae85d01d 100644
--- a/source3/libsmb/clisymlink.c
+++ b/source3/libsmb/clisymlink.c
@@ -90,7 +90,7 @@ static void cli_symlink_create_done(struct tevent_req *subreq)
size_t data_len;
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->fnum);
+ status = cli_ntcreate_recv(subreq, &state->fnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
@@ -275,7 +275,7 @@ static void cli_readlink_opened(struct tevent_req *subreq)
req, struct cli_readlink_state);
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->fnum);
+ status = cli_ntcreate_recv(subreq, &state->fnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 7d34290b65d..8e6590a5367 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -904,7 +904,7 @@ cacl_get(SMBCCTX *context,
status = cli_ntcreate(targetcli, targetpath, 0,
CREATE_ACCESS_READ, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x0, 0x0, &fnum);
+ FILE_OPEN, 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5, ("cacl_get failed to open %s: %s\n",
targetpath, nt_errstr(status)));
@@ -1563,7 +1563,7 @@ cacl_set(SMBCCTX *context,
status = cli_ntcreate(targetcli, targetpath, 0, CREATE_ACCESS_READ, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
- 0x0, 0x0, &fnum);
+ 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5, ("cacl_set failed to open %s: %s\n",
targetpath, nt_errstr(status)));
@@ -1671,7 +1671,7 @@ cacl_set(SMBCCTX *context,
status = cli_ntcreate(targetcli, targetpath, 0,
WRITE_DAC_ACCESS | WRITE_OWNER_ACCESS, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
- 0x0, 0x0, &fnum);
+ 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5, ("cacl_set failed to open %s: %s\n",
targetpath, nt_errstr(status)));
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index a1389ff4655..525625cd300 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -356,7 +356,9 @@ struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx,
uint32_t CreateDisposition,
uint32_t CreateOptions,
uint8_t SecurityFlags);
-NTSTATUS cli_ntcreate_recv(struct tevent_req *req, uint16_t *pfnum);
+NTSTATUS cli_ntcreate_recv(struct tevent_req *req,
+ uint16_t *pfnum,
+ struct smb_create_returns *cr);
NTSTATUS cli_ntcreate(struct cli_state *cli,
const char *fname,
uint32_t CreatFlags,
@@ -366,7 +368,8 @@ NTSTATUS cli_ntcreate(struct cli_state *cli,
uint32_t CreateDisposition,
uint32_t CreateOptions,
uint8_t SecurityFlags,
- uint16_t *pfid);
+ uint16_t *pfid,
+ struct smb_create_returns *cr);
uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, const char *str,
size_t str_len, size_t *pconverted_size);
uint8_t *smb_bytes_push_bytes(uint8_t *buf, uint8_t prefix,
@@ -600,7 +603,9 @@ struct tevent_req *cli_nttrans_create_send(TALLOC_CTX *mem_ctx,
struct security_descriptor *secdesc,
struct ea_struct *eas,
int num_eas);
-NTSTATUS cli_nttrans_create_recv(struct tevent_req *req, uint16_t *fnum);
+NTSTATUS cli_nttrans_create_recv(struct tevent_req *req,
+ uint16_t *fnum,
+ struct smb_create_returns *cr);
NTSTATUS cli_nttrans_create(struct cli_state *cli,
const char *fname,
uint32_t CreatFlags,
@@ -613,7 +618,8 @@ NTSTATUS cli_nttrans_create(struct cli_state *cli,
struct security_descriptor *secdesc,
struct ea_struct *eas,
int num_eas,
- uint16_t *pfid);
+ uint16_t *pfid,
+ struct smb_create_returns *cr);
/* The following definitions come from libsmb/clifsinfo.c */
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c
index 533df67ebb4..2d6853ae6e1 100644
--- a/source3/libsmb/pylibsmb.c
+++ b/source3/libsmb/pylibsmb.c
@@ -610,7 +610,7 @@ static PyObject *py_cli_create(struct py_cli_state *self, PyObject *args,
if (!py_tevent_req_wait_exc(self->ev, req)) {
return NULL;
}
- status = cli_ntcreate_recv(req, &fnum);
+ status = cli_ntcreate_recv(req, &fnum, NULL);
TALLOC_FREE(req);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/torture/nbench.c b/source3/torture/nbench.c
index cb8a410e2eb..80b5a72054c 100644
--- a/source3/torture/nbench.c
+++ b/source3/torture/nbench.c
@@ -338,7 +338,7 @@ static void nbench_cmd_done(struct tevent_req *subreq)
switch (state->cmd->cmd) {
case NBENCH_CMD_NTCREATEX: {
struct ftable *ft;
- status = cli_ntcreate_recv(subreq, &state->ft->fnum);
+ status = cli_ntcreate_recv(subreq, &state->ft->fnum, NULL);
TALLOC_FREE(subreq);
if (status_wrong(req, state->cmd->status, status)) {
return;
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index fba83ea9bfb..ba4fa955987 100644
--- a/source3/torture/nbio.c
+++ b/source3/torture/nbio.c
@@ -166,7 +166,7 @@ void nb_createx(const char *fname,
0x0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
create_disposition,
- create_options, 0, &fd);
+ create_options, 0, &fd, NULL);
if (!NT_STATUS_IS_OK(status) && handle != -1) {
printf("ERROR: cli_ntcreate failed for %s - %s\n",
fname, nt_errstr(status));
diff --git a/source3/torture/test_chain3.c b/source3/torture/test_chain3.c
index 7be8859d9b9..cad1a3fb407 100644
--- a/source3/torture/test_chain3.c
+++ b/source3/torture/test_chain3.c
@@ -234,7 +234,7 @@ static void chain3_ntcreate_done(struct tevent_req *subreq)
req, struct chain3_state);
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->fnum);
+ status = cli_ntcreate_recv(subreq, &state->fnum, NULL);
TALLOC_FREE(subreq);
printf("cli_ntcreate returned %s, fnum=%u\n", nt_errstr(status),
(unsigned)state->fnum);
diff --git a/source3/torture/test_cleanup.c b/source3/torture/test_cleanup.c
index 319a55f3298..a831ed74a7f 100644
--- a/source3/torture/test_cleanup.c
+++ b/source3/torture/test_cleanup.c
@@ -60,7 +60,7 @@ bool run_cleanup1(int dummy)
FILE_GENERIC_READ|FILE_GENERIC_WRITE|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, FILE_DELETE_ON_CLOSE, 0, &fnum);
+ FILE_OPEN, FILE_DELETE_ON_CLOSE, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("2nd open of %s failed (%s)\n", fname,
nt_errstr(status));
@@ -89,7 +89,7 @@ bool run_cleanup2(int dummy)
cli1, fname, 0, FILE_GENERIC_READ|FILE_GENERIC_WRITE,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("open of %s failed (%s)\n", fname, nt_errstr(status));
return false;
@@ -110,7 +110,7 @@ bool run_cleanup2(int dummy)
cli2, fname, 0, FILE_GENERIC_READ|FILE_GENERIC_WRITE,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("open of %s failed (%s)\n", fname, nt_errstr(status));
return false;
@@ -144,7 +144,7 @@ bool run_cleanup2(int dummy)
cli2, fname, 0, FILE_GENERIC_READ|FILE_GENERIC_WRITE,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("open of %s failed (%s)\n", fname, nt_errstr(status));
return false;
@@ -352,7 +352,7 @@ bool run_cleanup4(int dummy)
FILE_GENERIC_READ|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("creating file failed: %s\n",
nt_errstr(status));
@@ -364,7 +364,7 @@ bool run_cleanup4(int dummy)
FILE_GENERIC_READ|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("opening file 1st time failed: %s\n",
nt_errstr(status));
@@ -390,7 +390,7 @@ bool run_cleanup4(int dummy)
FILE_GENERIC_WRITE|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_EQUAL(status, NT_STATUS_SHARING_VIOLATION)) {
printf("opening file 2nd time returned: %s\n",
nt_errstr(status));
diff --git a/source3/torture/test_notify.c b/source3/torture/test_notify.c
index 35e64bcd129..e377875ef85 100644
--- a/source3/torture/test_notify.c
+++ b/source3/torture/test_notify.c
@@ -82,7 +82,7 @@ static void wait_for_one_notify_opened(struct tevent_req *subreq)
req, struct wait_for_one_notify_state);
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->dnum);
+ status = cli_ntcreate_recv(subreq, &state->dnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
@@ -334,7 +334,7 @@ static void notify_bench3_mkdir1_done(struct tevent_req *subreq)
req, struct notify_bench3_state);
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->dnum);
+ status = cli_ntcreate_recv(subreq, &state->dnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
@@ -471,7 +471,7 @@ static void notify_bench3_mksubdir_done(struct tevent_req *subreq)
req, struct notify_bench3_state);
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->subdir_dnum);
+ status = cli_ntcreate_recv(subreq, &state->subdir_dnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
diff --git a/source3/torture/test_notify_online.c b/source3/torture/test_notify_online.c
index b59ce203df9..7f4f52111cd 100644
--- a/source3/torture/test_notify_online.c
+++ b/source3/torture/test_notify_online.c
@@ -77,7 +77,7 @@ static void notify_online_opened_dir(struct tevent_req *subreq)
req, struct notify_online_state);
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->dnum);
+ status = cli_ntcreate_recv(subreq, &state->dnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
@@ -131,7 +131,7 @@ static void notify_online_opened_file(struct tevent_req *subreq)
req, struct notify_online_state);
NTSTATUS status;
- status = cli_ntcreate_recv(subreq, &state->fnum);
+ status = cli_ntcreate_recv(subreq, &state->fnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
diff --git a/source3/torture/test_nttrans_create.c b/source3/torture/test_nttrans_create.c
index f6444e833e0..5e7ce7e16c3 100644
--- a/source3/torture/test_nttrans_create.c
+++ b/source3/torture/test_nttrans_create.c
@@ -71,7 +71,7 @@ bool run_nttrans_create(int dummy)
READ_CONTROL_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE| FILE_SHARE_DELETE,
- FILE_CREATE, 0, 0, sd, NULL, 0, &fnum);
+ FILE_CREATE, 0, 0, sd, NULL, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "cli_nttrans_create returned %s\n",
nt_errstr(status));
@@ -84,7 +84,7 @@ bool run_nttrans_create(int dummy)
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|
FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
status = cli_nt_delete_on_close(cli, fnum, true);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/torture/test_nttrans_fsctl.c b/source3/torture/test_nttrans_fsctl.c
index 963b20ef4b6..c2d8e684851 100644
--- a/source3/torture/test_nttrans_fsctl.c
+++ b/source3/torture/test_nttrans_fsctl.c
@@ -51,7 +51,7 @@ bool run_nttrans_fsctl(int dummy)
READ_CONTROL_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE| FILE_SHARE_DELETE,
- FILE_CREATE, 0, 0, NULL, NULL, 0, &fnum);
+ FILE_CREATE, 0, 0, NULL, NULL, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, "cli_nttrans_create returned %s\n",
nt_errstr(status));
diff --git a/source3/torture/test_posix_append.c b/source3/torture/test_posix_append.c
index d4784e8e7c2..9f892e3305e 100644
--- a/source3/torture/test_posix_append.c
+++ b/source3/torture/test_posix_append.c
@@ -57,7 +57,7 @@ bool run_posix_append(int dummy)
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OVERWRITE_IF,
FILE_NON_DIRECTORY_FILE|FILE_DELETE_ON_CLOSE,
- 0, &fnum);
+ 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("cli_ntcreate failed: %s\n", nt_errstr(status));
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 08265067238..95d8b333ecb 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -3873,7 +3873,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_ALL_ACCESS|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
- FILE_DELETE_ON_CLOSE, 0, &fnum1);
+ FILE_DELETE_ON_CLOSE, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[1] open of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -3900,7 +3900,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_ALL_ACCESS,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[2] open of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -3938,7 +3938,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_ALL_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[3] open - 1 of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -3950,7 +3950,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (NT_STATUS_IS_OK(status)) {
printf("[3] open - 2 of %s succeeded - should have failed.\n", fname);
goto fail;
@@ -3960,7 +3960,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[3] open - 3 of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4007,7 +4007,7 @@ static bool run_deletetest(int dummy)
FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[4] open of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4017,7 +4017,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[4] open - 2 of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4039,7 +4039,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (NT_STATUS_IS_OK(status)) {
printf("[4] open - 3 of %s succeeded ! Should have failed.\n", fname );
goto fail;
@@ -4086,7 +4086,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, FILE_READ_DATA|FILE_WRITE_DATA,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[6] open of %s failed (%s)\n", fname,
nt_errstr(status));
@@ -4116,7 +4116,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0,
FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
- 0, 0, &fnum1);
+ 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[7] open of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4170,7 +4170,7 @@ static bool run_deletetest(int dummy)
FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[8] open 1 of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4180,7 +4180,7 @@ static bool run_deletetest(int dummy)
FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[8] open 2 of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4220,7 +4220,7 @@ static bool run_deletetest(int dummy)
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_NONE,
FILE_OVERWRITE_IF,
- FILE_DELETE_ON_CLOSE, 0, &fnum1);
+ FILE_DELETE_ON_CLOSE, 0, &fnum1, NULL);
if (NT_STATUS_IS_OK(status)) {
printf("[9] open of %s succeeded should have failed!\n", fname);
goto fail;
@@ -4234,7 +4234,7 @@ static bool run_deletetest(int dummy)
FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
FILE_OVERWRITE_IF, FILE_DELETE_ON_CLOSE,
- 0, &fnum1);
+ 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[10] open of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4266,7 +4266,7 @@ static bool run_deletetest(int dummy)
/* Create a readonly file. */
status = cli_ntcreate(cli1, fname, 0, FILE_READ_DATA|FILE_WRITE_DATA,
FILE_ATTRIBUTE_READONLY, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[11] open of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4283,7 +4283,7 @@ static bool run_deletetest(int dummy)
FILE_READ_ATTRIBUTES|DELETE_ACCESS,
0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum1);
+ FILE_OPEN, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[11] open of %s failed: %s\n", fname, nt_errstr(status));
goto fail;
@@ -4306,7 +4306,7 @@ static bool run_deletetest(int dummy)
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OVERWRITE_IF,
- FILE_DELETE_ON_CLOSE, 0, &fnum1);
+ FILE_DELETE_ON_CLOSE, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[12] open 1 of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4315,7 +4315,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[12] open 2 of %s failed(%s).\n", fname, nt_errstr(status));
goto fail;
@@ -4337,7 +4337,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (NT_STATUS_IS_OK(status)) {
printf("[12] open 3 of %s succeeded - should fail).\n", fname);
goto fail;
@@ -4352,7 +4352,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("[12] open 4 of %s failed (%s)\n", fname, nt_errstr(status));
goto fail;
@@ -4377,7 +4377,7 @@ static bool run_deletetest(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2);
+ FILE_OPEN, 0, 0, &fnum2, NULL);
if (NT_STATUS_IS_OK(status)) {
printf("[12] open 5 of %s succeeded - should fail).\n", fname);
goto fail;
@@ -4460,7 +4460,7 @@ static bool run_deletetest_ln(int dummy)
status = cli_ntcreate(cli, fname, 0, FILE_READ_DATA,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN_IF, 0, 0, &fnum);
+ FILE_OPEN_IF, 0, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("ntcreate of %s failed (%s)\n", fname, nt_errstr(status));
return false;
@@ -4470,7 +4470,7 @@ static bool run_deletetest_ln(int dummy)
status = cli_ntcreate(cli, fname_ln, 0, DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN_IF, 0, 0, &fnum1);
+ FILE_OPEN_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("ntcreate of %s failed (%s)\n", fname_ln, nt_errstr(status));
return false;
@@ -4595,7 +4595,7 @@ static bool run_xcopy(int dummy)
status = cli_ntcreate(cli1, fname, 0, FIRST_DESIRED_ACCESS,
FILE_ATTRIBUTE_ARCHIVE, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0x4044, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0x4044, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("First open failed - %s\n", nt_errstr(status));
return False;
@@ -4603,7 +4603,7 @@ static bool run_xcopy(int dummy)
status = cli_ntcreate(cli1, fname, 0, SECOND_DESIRED_ACCESS, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0x200000, 0, &fnum2);
+ FILE_OPEN, 0x200000, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("second open failed - %s\n", nt_errstr(status));
return False;
@@ -4640,7 +4640,7 @@ static bool run_rename(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("First open failed - %s\n", nt_errstr(status));
return False;
@@ -4668,7 +4668,7 @@ static bool run_rename(int dummy)
#else
FILE_SHARE_DELETE|FILE_SHARE_READ,
#endif
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Second open failed - %s\n", nt_errstr(status));
return False;
@@ -4693,7 +4693,7 @@ static bool run_rename(int dummy)
status = cli_ntcreate(cli1, fname, 0, READ_CONTROL_ACCESS,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Third open failed - %s\n", nt_errstr(status));
return False;
@@ -4705,7 +4705,7 @@ static bool run_rename(int dummy)
uint16_t fnum2;
if (!NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, DELETE_ACCESS, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_NONE, FILE_OVERWRITE_IF, 0, 0, &fnum2))) {
+ FILE_SHARE_NONE, FILE_OVERWRITE_IF, 0, 0, &fnum2, NULL))) {
printf("Fourth open failed - %s\n", cli_errstr(cli1));
return False;
}
@@ -4743,7 +4743,7 @@ static bool run_rename(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ | FILE_SHARE_WRITE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Fourth open failed - %s\n", nt_errstr(status));
return False;
@@ -4771,7 +4771,7 @@ static bool run_rename(int dummy)
status = cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Fifth open failed - %s\n", nt_errstr(status));
return False;
@@ -4790,7 +4790,8 @@ static bool run_rename(int dummy)
*/
/* if (!NT_STATUS_OP(cli_ntcreate(cli1, fname, 0, GENERIC_READ_ACCESS, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_OVERWRITE_IF, 0, 0, &fnum2))) {
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ FILE_OVERWRITE_IF, 0, 0, &fnum2, NULL))) {
printf("Opening original file after rename of open file fails: %s\n",
cli_errstr(cli1));
}
@@ -4853,7 +4854,7 @@ static bool run_pipe_number(int dummy)
status = cli_ntcreate(cli1, pipe_name, 0, FILE_READ_DATA,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN_IF, 0, 0, &fnum);
+ FILE_OPEN_IF, 0, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Open of pipe %s failed with error (%s)\n", pipe_name, nt_errstr(status));
break;
@@ -5052,7 +5053,7 @@ static bool run_opentest(int dummy)
printf("TEST #1 testing 2 non-io opens (no delete)\n");
status = cli_ntcreate(cli1, fname, 0, FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #1 open 1 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5060,7 +5061,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli2, fname, 0, FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OPEN_IF, 0, 0, &fnum2);
+ FILE_OPEN_IF, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #1 open 2 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5087,7 +5088,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli1, fname, 0,
DELETE_ACCESS|FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #2 open 1 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5095,7 +5096,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli2, fname, 0, FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OPEN_IF, 0, 0, &fnum2);
+ FILE_OPEN_IF, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #2 open 2 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5121,7 +5122,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli1, fname, 0, FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #3 open 1 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5130,7 +5131,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli2, fname, 0,
DELETE_ACCESS|FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OPEN_IF, 0, 0, &fnum2);
+ FILE_OPEN_IF, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #3 open 2 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5157,7 +5158,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli1, fname, 0,
DELETE_ACCESS|FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #4 open 1 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5166,7 +5167,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli2, fname, 0,
DELETE_ACCESS|FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OPEN_IF, 0, 0, &fnum2);
+ FILE_OPEN_IF, 0, 0, &fnum2, NULL);
if (NT_STATUS_IS_OK(status)) {
printf("TEST #4 open 2 of %s SUCCEEDED - should have failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5189,7 +5190,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli1, fname, 0,
DELETE_ACCESS|FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #5 open 1 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5198,7 +5199,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli2, fname, 0,
DELETE_ACCESS|FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_DELETE,
- FILE_OPEN_IF, 0, 0, &fnum2);
+ FILE_OPEN_IF, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #5 open 2 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5224,7 +5225,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli1, fname, 0, FILE_READ_DATA,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #6 open 1 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5232,7 +5233,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli2, fname, 0, FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ,
- FILE_OPEN_IF, 0, 0, &fnum2);
+ FILE_OPEN_IF, 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #6 open 2 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5258,7 +5259,7 @@ static bool run_opentest(int dummy)
status = cli_ntcreate(cli1, fname, 0, FILE_READ_DATA,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #7 open 1 of %s failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5268,7 +5269,7 @@ static bool run_opentest(int dummy)
DELETE_ACCESS|FILE_READ_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_DELETE,
- FILE_OPEN_IF, 0, 0, &fnum2);
+ FILE_OPEN_IF, 0, 0, &fnum2, NULL);
if (NT_STATUS_IS_OK(status)) {
printf("TEST #7 open 2 of %s SUCCEEDED - should have failed (%s)\n", fname, nt_errstr(status));
return False;
@@ -5289,7 +5290,7 @@ static bool run_opentest(int dummy)
printf("TEST #8 testing open without WRITE_ATTRIBUTES, updating close write time.\n");
status = cli_ntcreate(cli1, fname, 0, FILE_WRITE_DATA, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("TEST #8 open of %s failed (%s)\n", fname, nt_errstr(status));
correct = false;
@@ -5700,7 +5701,7 @@ static bool run_simple_posix_open_test(int dummy)
FILE_READ_DATA|FILE_WRITE_DATA, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_CREATE,
- 0x0, 0x0, &fnum2);
+ 0x0, 0x0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Windows create of %s failed (%s)\n", fname_windows,
nt_errstr(status));
@@ -5834,7 +5835,7 @@ static bool run_openattrtest(int dummy)
status = cli_ntcreate(cli1, fname, 0, FILE_WRITE_DATA,
open_attrs_table[i], FILE_SHARE_NONE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ FILE_OVERWRITE_IF, 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("open %d (1) of %s failed (%s)\n", i, fname, nt_errstr(status));
return False;
@@ -5851,7 +5852,7 @@ static bool run_openattrtest(int dummy)
FILE_READ_DATA|FILE_WRITE_DATA,
open_attrs_table[j],
FILE_SHARE_NONE, FILE_OVERWRITE,
- 0, 0, &fnum1);
+ 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
for (l = 0; l < sizeof(attr_results)/sizeof(struct trunc_open_results); l++) {
if (attr_results[l].num == k) {
@@ -6187,7 +6188,7 @@ static bool run_eatest(int dummy)
status = cli_ntcreate(cli, fname, 0,
FIRST_DESIRED_ACCESS, FILE_ATTRIBUTE_ARCHIVE,
FILE_SHARE_NONE, FILE_OVERWRITE_IF,
- 0x4044, 0, &fnum);
+ 0x4044, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("open failed - %s\n", nt_errstr(status));
talloc_destroy(mem_ctx);
@@ -6321,7 +6322,8 @@ static bool run_dirtest1(int dummy)
fstring fname;
slprintf(fname, sizeof(fname), "\\LISTDIR\\f%d", i);
if (!NT_STATUS_IS_OK(cli_ntcreate(cli, fname, 0, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_ARCHIVE,
- FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OVERWRITE_IF, 0, 0, &fnum))) {
+ FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OVERWRITE_IF,
+ 0, 0, &fnum, NULL))) {
fprintf(stderr,"Failed to open %s\n", fname);
return False;
}
@@ -6516,7 +6518,7 @@ static bool run_sesssetup_bench(int dummy)
status = cli_ntcreate(c, fname, 0, GENERIC_ALL_ACCESS|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
- FILE_DELETE_ON_CLOSE, 0, &fnum);
+ FILE_DELETE_ON_CLOSE, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("open %s failed: %s\n", fname, nt_errstr(status));
return false;
@@ -6752,7 +6754,7 @@ static void torture_createdel_created(struct tevent_req *subreq)
NTSTATUS status;
uint16_t fnum;
- status = cli_ntcreate_recv(subreq, &fnum);
+ status = cli_ntcreate_recv(subreq, &fnum, NULL);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
DEBUG(10, ("cli_ntcreate_recv returned %s\n",
@@ -7055,7 +7057,7 @@ static bool run_notify_bench(int dummy)
0, FILE_SHARE_READ|FILE_SHARE_WRITE|
FILE_SHARE_DELETE,
FILE_OPEN_IF, FILE_DIRECTORY_FILE, 0,
- &dnum);
+ &dnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not create %s: %s\n", dname,
@@ -7125,7 +7127,7 @@ static bool run_mangle1(int dummy)
status = cli_ntcreate(cli, fname, 0, GENERIC_ALL_ACCESS|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
- 0, 0, &fnum);
+ 0, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("open %s failed: %s\n", fname, nt_errstr(status));
return false;
@@ -7401,7 +7403,7 @@ static bool run_large_readx(int dummy)
/* Create a file of size 4MB. */
status = cli_ntcreate(cli1, fname, 0, GENERIC_ALL_ACCESS,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
- 0, 0, &fnum1);
+ 0, 0, &fnum1, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("open %s failed: %s\n", fname, nt_errstr(status));
@@ -7510,7 +7512,7 @@ static bool run_large_readx(int dummy)
status = cli_ntcreate(cli2, fname, 0, FILE_READ_DATA,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OPEN,
- 0, 0, &fnum2);
+ 0, 0, &fnum2, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Second open %s failed: %s\n", fname, nt_errstr(status));
goto out;
@@ -7792,7 +7794,8 @@ static bool run_shortname_test(int dummy)
fname[15] = i;
status = cli_ntcreate(cli, fname, 0, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OVERWRITE_IF, 0, 0, &fnum);
+ FILE_SHARE_READ|FILE_SHARE_WRITE,
+ FILE_OVERWRITE_IF, 0, 0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_printf("(%s) cli_nt_create of %s failed: %s\n",
__location__, fname, nt_errstr(status));
@@ -8048,7 +8051,7 @@ static bool run_streamerror(int dummy)
FILE_READ_DATA|FILE_READ_EA|
FILE_READ_ATTRIBUTES|READ_CONTROL_ACCESS,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ,
- FILE_OPEN, 0, 0, &fnum);
+ FILE_OPEN, 0, 0, &fnum, NULL);
if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
printf("ntcreate returned %s, expected "
diff --git a/source3/torture/utable.c b/source3/torture/utable.c
index a2db3ba0fea..27330914e5e 100644
--- a/source3/torture/utable.c
+++ b/source3/torture/utable.c
@@ -164,7 +164,7 @@ bool torture_casetable(int dummy)
GENERIC_ALL_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_NONE,
- FILE_OPEN_IF, 0, 0, &fnum))) {
+ FILE_OPEN_IF, 0, 0, &fnum, NULL))) {
printf("Failed to create file with char %04x\n", c);
continue;
}
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 778e888950e..b5c4d0b2e93 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5104,7 +5104,8 @@ static void show_userlist(struct rpc_pipe_client *pipe_hnd,
}
if (!NT_STATUS_IS_OK(cli_ntcreate(cli, "\\", 0, READ_CONTROL_ACCESS, 0,
- FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0x0, 0x0, &fnum))) {
+ FILE_SHARE_READ|FILE_SHARE_WRITE,
+ FILE_OPEN, 0x0, 0x0, &fnum, NULL))) {
cli_query_secdesc(cli, fnum, mem_ctx, &root_sd);
}
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 7ff838675ed..3cdac6223fb 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -177,7 +177,7 @@ NTSTATUS net_copy_fileattr(struct net_context *c,
nt_status = cli_ntcreate(cli_share_src, src_name, 0,
READ_CONTROL_ACCESS, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
- 0x0, 0x0, &fnum_src);
+ 0x0, 0x0, &fnum_src, NULL);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUGADD(0,("cannot open %s %s on originating server %s\n",
is_file?"file":"dir", src_name, nt_errstr(nt_status)));
@@ -214,7 +214,7 @@ NTSTATUS net_copy_fileattr(struct net_context *c,
nt_status = cli_ntcreate(cli_share_dst, dst_name, 0,
WRITE_DAC_ACCESS | WRITE_OWNER_ACCESS, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
- 0x0, 0x0, &fnum_dst);
+ 0x0, 0x0, &fnum_dst, NULL);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("failed to open %s on the destination server: %s: %s\n",
is_file?"file":"dir", dst_name, nt_errstr(nt_status)));
@@ -331,7 +331,8 @@ NTSTATUS net_copy_file(struct net_context *c,
nt_status = cli_open(cli_share_src, src_name, O_RDONLY, DENY_NONE, &fnum_src);
else
nt_status = cli_ntcreate(cli_share_src, src_name, 0, READ_CONTROL_ACCESS, 0,
- FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0x0, 0x0, &fnum_src);
+ FILE_SHARE_READ|FILE_SHARE_WRITE,
+ FILE_OPEN, 0x0, 0x0, &fnum_src, NULL);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUGADD(0,("cannot open %s %s on originating server %s\n",
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 8d3071cc956..684fe791da1 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -810,7 +810,7 @@ static uint16 get_fileinfo(struct cli_state *cli, const char *filename)
status = cli_ntcreate(cli, filename, 0, CREATE_ACCESS_READ,
0, FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x0, 0x0, &fnum);
+ FILE_OPEN, 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open %s: %s\n", filename, nt_errstr(status));
return 0;
@@ -858,7 +858,7 @@ static struct security_descriptor *get_secdesc(struct cli_state *cli, const char
status = cli_ntcreate(cli, filename, 0, desired_access,
0, FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x0, 0x0, &fnum);
+ FILE_OPEN, 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open %s: %s\n", filename, nt_errstr(status));
return NULL;
@@ -922,7 +922,7 @@ static bool set_secdesc(struct cli_state *cli, const char *filename,
status = cli_ntcreate(cli, filename, 0,
desired_access,
0, FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x0, 0x0, &fnum);
+ FILE_OPEN, 0x0, 0x0, &fnum, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open %s: %s\n", filename, nt_errstr(status));
return false;