summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-04-01 13:12:55 -0700
committerJeremy Allison <jra@samba.org>2013-04-19 14:11:00 -0700
commit61da7f00b3f3daebb82e6a5d987883e0897dc4e9 (patch)
treeb698f8c1b033cb45c91aad9b7af9a5bdaf05db4b /source3/smbd
parent63739440f128229a6a99d0653562d3735ae909fb (diff)
downloadsamba-61da7f00b3f3daebb82e6a5d987883e0897dc4e9.tar.gz
samba-61da7f00b3f3daebb82e6a5d987883e0897dc4e9.tar.bz2
samba-61da7f00b3f3daebb82e6a5d987883e0897dc4e9.zip
Add utility function get_min_receive_file_size().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_server.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 7eb62fcfb3..1c622a8a54 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2842,6 +2842,17 @@ static int smbd_smb2_request_next_vector(struct tstream_context *stream,
size_t *_count);
static void smbd_smb2_request_read_done(struct tevent_req *subreq);
+static size_t get_min_receive_file_size(struct smbd_smb2_request *smb2_req)
+{
+ if (smb2_req->do_signing) {
+ return 0;
+ }
+ if (smb2_req->do_encryption) {
+ return 0;
+ }
+ return (size_t)lp_min_receive_file_size();
+}
+
static struct tevent_req *smbd_smb2_request_read_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbd_server_connection *sconn)