[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Wed Jul 25 01:24:02 UTC 2018
The branch, master has been updated
via 1e78cb5 s3: vfs: bump to version 40, Samba 4.10 will ship with that
via b2ae22a s3: vfs: bump to version 39, Samba 4.9 will ship with that
via 55097f7 s3: vfs: add missing tevent_req_received() to SMB_VFS_FSYNC_RECV()
via d769e9e s3: vfs: add missing tevent_req_received() to SMB_VFS_PWRITE_RECV()
via 83f01b0 s3: vfs: add missing tevent_req_received() to SMB_VFS_PREAD_RECV()
via 27bb2cb vfs_default: fix async fsync idle/busy time profiling
via 580ff20 s3: libsmb: use smb2cli_conn_max_trans_size() in cli_smb2_list()
via 76c68bc s4: libcli/smb2: calculate correct credit charge for finds
via 7d1de8b s3: lib/xattr_tdb: fix listing xattrs
via 1bc92d1 vfs_default: call smb_vfs_assert_all_fns()
via 42e99ec examples/VFS/skel_transparent: call smb_vfs_assert_all_fns()
via 829fdf1 examples/VFS/skel_transparent: add missing durable handle functions
via 68b8e5a examples/VFS/skel_transparent: add missing audit_file_fn
via f9db9ae examples/VFS/skel_opaque: call smb_vfs_assert_all_fns()
via d163353 examples/VFS/skel_opaque: add missing durable handle functions
via b294c7c examples/VFS/skel_opaque: add missing audit_file_fn
via 010bbe5 autobuild: add some basic tests for the all static build
from 7d40f60 winbind: Move variable declarations close to their use
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 1e78cb57f663fa3592655d9b8dfa25ae9a81ff7d
Author: Ralph Boehme <slow at samba.org>
Date: Tue Mar 13 16:17:27 2018 +0100
s3: vfs: bump to version 40, Samba 4.10 will ship with that
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Wed Jul 25 03:23:44 CEST 2018 on sn-devel-144
commit b2ae22a310c07da61ca5d57cba1b403851e928d9
Author: Ralph Boehme <slow at samba.org>
Date: Tue Mar 13 16:17:27 2018 +0100
s3: vfs: bump to version 39, Samba 4.9 will ship with that
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 55097f7d1d836471363011a8777224af0c772905
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jul 12 14:44:40 2018 +0200
s3: vfs: add missing tevent_req_received() to SMB_VFS_FSYNC_RECV()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit d769e9ea4087dc8e7224f440db6801e0a8a2d801
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jul 12 14:44:27 2018 +0200
s3: vfs: add missing tevent_req_received() to SMB_VFS_PWRITE_RECV()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 83f01b0212cbdd9af88a46a8f1c5c27626e63537
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jul 12 14:43:55 2018 +0200
s3: vfs: add missing tevent_req_received() to SMB_VFS_PREAD_RECV()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 27bb2cbc2ed6e5f3309a4abb1d7f74e3c4a21830
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jun 20 10:54:04 2018 +0200
vfs_default: fix async fsync idle/busy time profiling
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 580ff206431969dc2924d520053b956b7169ca07
Author: Ralph Boehme <slow at samba.org>
Date: Tue Mar 20 15:27:44 2018 +0100
s3: libsmb: use smb2cli_conn_max_trans_size() in cli_smb2_list()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 76c68bc20f06e3e6244ef1a6b0d4b43be8ebea42
Author: Ralph Boehme <slow at samba.org>
Date: Thu Mar 22 10:07:49 2018 +0100
s4: libcli/smb2: calculate correct credit charge for finds
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 7d1de8bd48c0ea1e0ddd9f103d6fb1c7c3855c93
Author: Ralph Boehme <slow at samba.org>
Date: Thu Jun 28 21:47:54 2018 +0200
s3: lib/xattr_tdb: fix listing xattrs
If there's no record in the xattr.tdb, dbwrap_fetch() will return
NT_STATUS_NOT_FOUND. That should not result in an error in callers of
xattr_tdb_load_attrs().
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 1bc92d1090cb26b66c84e46b76411e6481869866
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jul 23 09:14:36 2018 +0200
vfs_default: call smb_vfs_assert_all_fns()
This module needs to implement every call.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 42e99ec331dd667f145389683d7a0d8d310a8275
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jul 23 09:02:52 2018 +0200
examples/VFS/skel_transparent: call smb_vfs_assert_all_fns()
This template should always include all calls.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 829fdf10303fed8ed0e972cc2391bc88eebb3bb6
Author: Ralph Boehme <slow at samba.org>
Date: Tue Jul 24 22:03:01 2018 +0200
examples/VFS/skel_transparent: add missing durable handle functions
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 68b8e5a5197898091041af887211caad4196ae07
Author: Ralph Boehme <slow at samba.org>
Date: Tue Jul 24 18:58:59 2018 +0200
examples/VFS/skel_transparent: add missing audit_file_fn
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit f9db9aeeab9ce1e36b5af8784fd5e5c9c4014fe8
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jul 23 09:02:52 2018 +0200
examples/VFS/skel_opaque: call smb_vfs_assert_all_fns()
This template should always implement all calls.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit d1633532a929c04c54c64ce49061e2eed590c3c2
Author: Ralph Boehme <slow at samba.org>
Date: Tue Jul 24 21:56:26 2018 +0200
examples/VFS/skel_opaque: add missing durable handle functions
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit b294c7c666d56f64d55b71bf9bf2e1223df1d6ef
Author: Ralph Boehme <slow at samba.org>
Date: Tue Jul 24 18:58:45 2018 +0200
examples/VFS/skel_opaque: add missing audit_file_fn
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 010bbe536e26a31bcb7d36cc946b1982247b4443
Author: Ralph Boehme <slow at samba.org>
Date: Tue Jul 24 12:30:33 2018 +0200
autobuild: add some basic tests for the all static build
This makes sure each module is at least loaded once
and registers itself as a module.
It means that the skel_opaque and skel_transparent vfs examples
are loaded.
Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
examples/VFS/skel_opaque.c | 50 ++++++++++++++++++++++++++++++
examples/VFS/skel_transparent.c | 68 +++++++++++++++++++++++++++++++++++++++++
script/autobuild.py | 4 +++
source3/include/smbprofile.h | 2 +-
source3/include/vfs.h | 4 ++-
source3/lib/xattr_tdb.c | 14 +++++++--
source3/libsmb/cli_smb2_fnum.c | 3 +-
source3/modules/vfs_default.c | 19 +++++++++---
source3/smbd/vfs.c | 6 ++++
source4/libcli/smb2/find.c | 1 +
10 files changed, 162 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 446cfd5..5b9d1f4 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -885,6 +885,43 @@ static bool skel_aio_force(struct vfs_handle_struct *handle,
return false;
}
+static NTSTATUS skel_audit_file(struct vfs_handle_struct *handle,
+ struct smb_filename *file,
+ struct security_acl *sacl,
+ uint32_t access_requested,
+ uint32_t access_denied)
+{
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS skel_durable_cookie(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ TALLOC_CTX *mem_ctx,
+ DATA_BLOB *cookie)
+{
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS skel_durable_disconnect(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const DATA_BLOB old_cookie,
+ TALLOC_CTX *mem_ctx,
+ DATA_BLOB *new_cookie)
+{
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS skel_durable_reconnect(struct vfs_handle_struct *handle,
+ struct smb_request *smb1req,
+ struct smbXsrv_open *op,
+ const DATA_BLOB old_cookie,
+ TALLOC_CTX *mem_ctx,
+ struct files_struct **fsp,
+ DATA_BLOB *new_cookie)
+{
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
/* VFS operations structure */
struct vfs_fn_pointers skel_opaque_fns = {
@@ -975,6 +1012,7 @@ struct vfs_fn_pointers skel_opaque_fns = {
.translate_name_fn = skel_translate_name,
.fsctl_fn = skel_fsctl,
.readdir_attr_fn = skel_readdir_attr,
+ .audit_file_fn = skel_audit_file,
/* DOS attributes. */
.get_dos_attributes_fn = skel_get_dos_attributes,
@@ -1010,11 +1048,23 @@ struct vfs_fn_pointers skel_opaque_fns = {
/* aio operations */
.aio_force_fn = skel_aio_force,
+
+ /* durable handle operations */
+ .durable_cookie_fn = skel_durable_cookie,
+ .durable_disconnect_fn = skel_durable_disconnect,
+ .durable_reconnect_fn = skel_durable_reconnect,
};
static_decl_vfs;
NTSTATUS vfs_skel_opaque_init(TALLOC_CTX *ctx)
{
+ /*
+ * smb_vfs_assert_all_fns() makes sure every
+ * call is implemented.
+ *
+ * An opaque module requires this!
+ */
+ smb_vfs_assert_all_fns(&skel_opaque_fns, "skel_opaque");
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
&skel_opaque_fns);
}
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 7f2c78b..513294f 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -1063,6 +1063,60 @@ static bool skel_aio_force(struct vfs_handle_struct *handle,
return SMB_VFS_NEXT_AIO_FORCE(handle, fsp);
}
+static NTSTATUS skel_audit_file(struct vfs_handle_struct *handle,
+ struct smb_filename *file,
+ struct security_acl *sacl,
+ uint32_t access_requested,
+ uint32_t access_denied)
+{
+ return SMB_VFS_NEXT_AUDIT_FILE(handle,
+ file,
+ sacl,
+ access_requested,
+ access_denied);
+}
+
+static NTSTATUS skel_durable_cookie(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ TALLOC_CTX *mem_ctx,
+ DATA_BLOB *cookie)
+{
+ return SMB_VFS_NEXT_DURABLE_COOKIE(handle,
+ fsp,
+ mem_ctx,
+ cookie);
+}
+
+static NTSTATUS skel_durable_disconnect(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ const DATA_BLOB old_cookie,
+ TALLOC_CTX *mem_ctx,
+ DATA_BLOB *new_cookie)
+{
+ return SMB_VFS_NEXT_DURABLE_DISCONNECT(handle,
+ fsp,
+ old_cookie,
+ mem_ctx,
+ new_cookie);
+}
+
+static NTSTATUS skel_durable_reconnect(struct vfs_handle_struct *handle,
+ struct smb_request *smb1req,
+ struct smbXsrv_open *op,
+ const DATA_BLOB old_cookie,
+ TALLOC_CTX *mem_ctx,
+ struct files_struct **fsp,
+ DATA_BLOB *new_cookie)
+{
+ return SMB_VFS_NEXT_DURABLE_RECONNECT(handle,
+ smb1req,
+ op,
+ old_cookie,
+ mem_ctx,
+ fsp,
+ new_cookie);
+}
+
/* VFS operations structure */
struct vfs_fn_pointers skel_transparent_fns = {
@@ -1153,6 +1207,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
.translate_name_fn = skel_translate_name,
.fsctl_fn = skel_fsctl,
.readdir_attr_fn = skel_readdir_attr,
+ .audit_file_fn = skel_audit_file,
/* DOS attributes. */
.get_dos_attributes_fn = skel_get_dos_attributes,
@@ -1188,11 +1243,24 @@ struct vfs_fn_pointers skel_transparent_fns = {
/* aio operations */
.aio_force_fn = skel_aio_force,
+
+ /* durable handle operations */
+ .durable_cookie_fn = skel_durable_cookie,
+ .durable_disconnect_fn = skel_durable_disconnect,
+ .durable_reconnect_fn = skel_durable_reconnect,
};
static_decl_vfs;
NTSTATUS vfs_skel_transparent_init(TALLOC_CTX *ctx)
{
+ /*
+ * smb_vfs_assert_all_fns() is only needed in
+ * order to have a complete example.
+ *
+ * A transparent vfs module typically don't
+ * need to implement every calls.
+ */
+ smb_vfs_assert_all_fns(&skel_transparent_fns, "skel_transparent");
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_transparent",
&skel_transparent_fns);
}
diff --git a/script/autobuild.py b/script/autobuild.py
index 1a8cf7c..f8b100e 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -242,6 +242,10 @@ tasks = {
# build with all modules static
("allstatic-configure", "./configure.developer " + samba_configure_params + " --with-static-modules=ALL", "text/plain"),
("allstatic-make", "make -j", "text/plain"),
+ ("allstatic-test", "make test "
+ "FAIL_IMMEDIATELY=1 "
+ "TESTS='samba3.smb2.create.*nt4_dc'",
+ "text/plain"),
# retry without any required modules
("none-distclean", "make distclean", "text/plain"),
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index 327c16a..e33f77e 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -63,7 +63,7 @@ struct tevent_context;
SMBPROFILE_STATS_BYTES(syscall_recvfile) \
SMBPROFILE_STATS_BASIC(syscall_rename) \
SMBPROFILE_STATS_BASIC(syscall_rename_at) \
- SMBPROFILE_STATS_BASIC(syscall_asys_fsync) \
+ SMBPROFILE_STATS_BYTES(syscall_asys_fsync) \
SMBPROFILE_STATS_BASIC(syscall_stat) \
SMBPROFILE_STATS_BASIC(syscall_fstat) \
SMBPROFILE_STATS_BASIC(syscall_lstat) \
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 4e5b787..90d39ac 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -245,6 +245,7 @@
/* Version 37 - Rename SMB_VFS_STRICT_LOCK to
SMB_VFS_STRICT_LOCK_CHECK */
/* Version 38 - Remove SMB_VFS_INIT_SEARCH_OP */
+/* Bump to version 39, Samba 4.9 will ship with that */
/* Version 39 - Remove SMB_VFS_FSYNC
Only implement async versions. */
/* Version 39 - Remove SMB_VFS_READ
@@ -255,8 +256,9 @@
/* Version 39 - Remove SMB_VFS_FCHMOD_ACL - no longer used. */
/* Version 39 - Remove struct dfree_cached_info pointer from
connection struct */
+/* Bump to version 40, Samba 4.10 will ship with that */
-#define SMB_VFS_INTERFACE_VERSION 39
+#define SMB_VFS_INTERFACE_VERSION 40
/*
All intercepted VFS operations must be declared as static functions inside module source
diff --git a/source3/lib/xattr_tdb.c b/source3/lib/xattr_tdb.c
index 34afbe2..f3a2e19 100644
--- a/source3/lib/xattr_tdb.c
+++ b/source3/lib/xattr_tdb.c
@@ -115,6 +115,9 @@ static NTSTATUS xattr_tdb_load_attrs(TALLOC_CTX *mem_ctx,
make_tdb_data(id_buf, sizeof(id_buf)),
&data);
if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+ return status;
+ }
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
@@ -316,14 +319,21 @@ ssize_t xattr_tdb_listattr(struct db_context *db_ctx,
status = xattr_tdb_load_attrs(frame, db_ctx, id, &attribs);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("xattr_tdb_fetch_attrs failed: %s\n",
+ if (!NT_STATUS_IS_OK(status) &&
+ !NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND))
+ {
+ DEBUG(0, ("xattr_tdb_fetch_attrs failed: %s\n",
nt_errstr(status)));
errno = EINVAL;
TALLOC_FREE(frame);
return -1;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+ TALLOC_FREE(frame);
+ return 0;
+ }
+
DEBUG(10, ("xattr_tdb_listattr: Found %d xattrs\n",
attribs->num_eas));
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index 1eb1bea..4b9871c 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -903,6 +903,7 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
TALLOC_CTX *frame = talloc_stackframe();
TALLOC_CTX *subframe = NULL;
bool mask_has_wild;
+ uint32_t max_trans = smb2cli_conn_max_trans_size(cli->conn);
if (smbXcli_conn_has_async_calls(cli->conn)) {
/*
@@ -966,7 +967,7 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
ph->fid_persistent,
ph->fid_volatile,
mask,
- 0xffff,
+ max_trans,
subframe,
&dir_data,
&dir_data_length);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 082b70f..f078cef 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -886,7 +886,7 @@ struct vfswrap_fsync_state {
int fd;
struct vfs_aio_state vfs_aio_state;
- SMBPROFILE_BASIC_ASYNC_STATE(profile_basic);
+ SMBPROFILE_BYTES_ASYNC_STATE(profile_bytes);
};
static void vfs_fsync_do(void *private_data);
@@ -909,8 +909,9 @@ static struct tevent_req *vfswrap_fsync_send(struct vfs_handle_struct *handle,
state->ret = -1;
state->fd = fsp->fh->fd;
- SMBPROFILE_BASIC_ASYNC_START(syscall_asys_fsync, profile_p,
- state->profile_basic);
+ SMBPROFILE_BYTES_ASYNC_START(syscall_asys_fsync, profile_p,
+ state->profile_bytes, 0);
+ SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes);
subreq = pthreadpool_tevent_job_send(
state, ev, handle->conn->sconn->pool, vfs_fsync_do, state);
@@ -931,6 +932,8 @@ static void vfs_fsync_do(void *private_data)
struct timespec start_time;
struct timespec end_time;
+ SMBPROFILE_BYTES_ASYNC_SET_BUSY(state->profile_bytes);
+
PROFILE_TIMESTAMP(&start_time);
do {
@@ -944,6 +947,8 @@ static void vfs_fsync_do(void *private_data)
PROFILE_TIMESTAMP(&end_time);
state->vfs_aio_state.duration = nsec_time_diff(&end_time, &start_time);
+
+ SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes);
}
static int vfs_fsync_state_destructor(struct vfswrap_fsync_state *state)
@@ -961,7 +966,7 @@ static void vfs_fsync_done(struct tevent_req *subreq)
ret = pthreadpool_tevent_job_recv(subreq);
TALLOC_FREE(subreq);
- SMBPROFILE_BASIC_ASYNC_END(state->profile_basic);
+ SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes);
talloc_set_destructor(state, NULL);
if (tevent_req_error(req, ret)) {
return;
@@ -3000,6 +3005,12 @@ static struct vfs_fn_pointers vfs_default_fns = {
static_decl_vfs;
NTSTATUS vfs_default_init(TALLOC_CTX *ctx)
{
+ /*
+ * Here we need to implement every call!
+ *
+ * As this is the end of the vfs module chain.
+ */
+ smb_vfs_assert_all_fns(&vfs_default_fns, DEFAULT_VFS_MODULE_NAME);
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
DEFAULT_VFS_MODULE_NAME, &vfs_default_fns);
}
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index ebe5ca5..a6f4280 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1708,9 +1708,11 @@ ssize_t SMB_VFS_PREAD_RECV(struct tevent_req *req,
req, struct smb_vfs_call_pread_state);
if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) {
+ tevent_req_received(req);
return -1;
}
*vfs_aio_state = state->vfs_aio_state;
+ tevent_req_received(req);
return state->retval;
}
@@ -1780,9 +1782,11 @@ ssize_t SMB_VFS_PWRITE_RECV(struct tevent_req *req,
req, struct smb_vfs_call_pwrite_state);
if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) {
+ tevent_req_received(req);
return -1;
}
*vfs_aio_state = state->vfs_aio_state;
+ tevent_req_received(req);
return state->retval;
}
@@ -1873,9 +1877,11 @@ int SMB_VFS_FSYNC_RECV(struct tevent_req *req, struct vfs_aio_state *vfs_aio_sta
req, struct smb_vfs_call_fsync_state);
if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) {
+ tevent_req_received(req);
return -1;
}
*vfs_aio_state = state->vfs_aio_state;
+ tevent_req_received(req);
return state->retval;
}
diff --git a/source4/libcli/smb2/find.c b/source4/libcli/smb2/find.c
index 2e0bd35..23ac737 100644
--- a/source4/libcli/smb2/find.c
+++ b/source4/libcli/smb2/find.c
@@ -35,6 +35,7 @@ struct smb2_request *smb2_find_send(struct smb2_tree *tree, struct smb2_find *io
req = smb2_request_init_tree(tree, SMB2_OP_QUERY_DIRECTORY, 0x20, true, 0);
if (req == NULL) return NULL;
+ req->credit_charge = (MAX(io->in.max_response_size, 1) - 1)/ 65536 + 1;
SCVAL(req->out.body, 0x02, io->in.level);
SCVAL(req->out.body, 0x03, io->in.continue_flags);
--
Samba Shared Repository
More information about the samba-cvs
mailing list