s3/smbd: move copychunk ioctl limits to IDL
authorRalph Boehme <slow@samba.org>
Wed, 8 Mar 2017 14:07:06 +0000 (15:07 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 28 Mar 2017 15:45:20 +0000 (17:45 +0200)
This will be needed in the next commit in vfs_default.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
librpc/idl/ioctl.idl
source3/smbd/smb2_ioctl_network_fs.c

index eb2dc8a4ea242691d1458d0bc3ac4474a135ff70..f72f9d2507b97691bd0863ee7c50796ed44a4148 100644 (file)
@@ -11,6 +11,10 @@ interface copychunk
                uint8 context[4];
        } req_resume_key_rsp;
 
+       const uint32 COPYCHUNK_MAX_CHUNKS = 256; /* 2k8r2 & win8 = 256 */
+       const uint32 COPYCHUNK_MAX_CHUNK_LEN = 1048576; /* 2k8r2 & win8 = 1048576 */
+       const uint32 COPYCHUNK_MAX_TOTAL_LEN = 16777216; /* 2k8r2 & win8 = 16777216 */
+
        typedef struct {
                hyper source_off;
                hyper target_off;
index c2b889b830db2117cf32aa91398cf7a06ce4cfbf..c279182f37552c7af1eb6851ed1c41099ee237bb 100644 (file)
@@ -31,9 +31,6 @@
 #include "smb2_ioctl_private.h"
 #include "../lib/tsocket/tsocket.h"
 
-#define COPYCHUNK_MAX_CHUNKS   256             /* 2k8r2 & win8 = 256 */
-#define COPYCHUNK_MAX_CHUNK_LEN        1048576         /* 2k8r2 & win8 = 1048576 */
-#define COPYCHUNK_MAX_TOTAL_LEN        16777216        /* 2k8r2 & win8 = 16777216 */
 static void copychunk_pack_limits(struct srv_copychunk_rsp *cc_rsp)
 {
        cc_rsp->chunks_written = COPYCHUNK_MAX_CHUNKS;