aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c344
1 files changed, 333 insertions, 11 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index f259e6cc8357..861b33214144 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -24,6 +24,7 @@
24#include "smb2proto.h" 24#include "smb2proto.h"
25#include "cifsproto.h" 25#include "cifsproto.h"
26#include "cifs_debug.h" 26#include "cifs_debug.h"
27#include "cifs_unicode.h"
27#include "smb2status.h" 28#include "smb2status.h"
28#include "smb2glob.h" 29#include "smb2glob.h"
29 30
@@ -229,7 +230,7 @@ smb2_is_path_accessible(const unsigned int xid, struct cifs_tcon *tcon,
229 oparms.fid = &fid; 230 oparms.fid = &fid;
230 oparms.reconnect = false; 231 oparms.reconnect = false;
231 232
232 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL); 233 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL);
233 if (rc) { 234 if (rc) {
234 kfree(utf16_path); 235 kfree(utf16_path);
235 return rc; 236 return rc;
@@ -376,10 +377,13 @@ static void
376smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock) 377smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock)
377{ 378{
378 struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode); 379 struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
380 struct TCP_Server_Info *server = tlink_tcon(cfile->tlink)->ses->server;
381
379 cfile->fid.persistent_fid = fid->persistent_fid; 382 cfile->fid.persistent_fid = fid->persistent_fid;
380 cfile->fid.volatile_fid = fid->volatile_fid; 383 cfile->fid.volatile_fid = fid->volatile_fid;
381 smb2_set_oplock_level(cinode, oplock); 384 server->ops->set_oplock_level(cinode, oplock, fid->epoch,
382 cinode->can_cache_brlcks = cinode->clientCanCacheAll; 385 &fid->purge_cache);
386 cinode->can_cache_brlcks = CIFS_CACHE_WRITE(cinode);
383} 387}
384 388
385static void 389static void
@@ -463,7 +467,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
463 oparms.fid = fid; 467 oparms.fid = fid;
464 oparms.reconnect = false; 468 oparms.reconnect = false;
465 469
466 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL); 470 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL);
467 kfree(utf16_path); 471 kfree(utf16_path);
468 if (rc) { 472 if (rc) {
469 cifs_dbg(VFS, "open dir failed\n"); 473 cifs_dbg(VFS, "open dir failed\n");
@@ -530,7 +534,7 @@ smb2_oplock_response(struct cifs_tcon *tcon, struct cifs_fid *fid,
530 534
531 return SMB2_oplock_break(0, tcon, fid->persistent_fid, 535 return SMB2_oplock_break(0, tcon, fid->persistent_fid,
532 fid->volatile_fid, 536 fid->volatile_fid,
533 cinode->clientCanCacheRead ? 1 : 0); 537 CIFS_CACHE_READ(cinode) ? 1 : 0);
534} 538}
535 539
536static int 540static int
@@ -550,7 +554,7 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
550 oparms.fid = &fid; 554 oparms.fid = &fid;
551 oparms.reconnect = false; 555 oparms.reconnect = false;
552 556
553 rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL); 557 rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL, NULL);
554 if (rc) 558 if (rc)
555 return rc; 559 return rc;
556 buf->f_type = SMB2_MAGIC_NUMBER; 560 buf->f_type = SMB2_MAGIC_NUMBER;
@@ -596,7 +600,245 @@ smb2_new_lease_key(struct cifs_fid *fid)
596 get_random_bytes(fid->lease_key, SMB2_LEASE_KEY_SIZE); 600 get_random_bytes(fid->lease_key, SMB2_LEASE_KEY_SIZE);
597} 601}
598 602
599struct smb_version_operations smb21_operations = { 603static int
604smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
605 const char *full_path, char **target_path,
606 struct cifs_sb_info *cifs_sb)
607{
608 int rc;
609 __le16 *utf16_path;
610 __u8 oplock = SMB2_OPLOCK_LEVEL_NONE;
611 struct cifs_open_parms oparms;
612 struct cifs_fid fid;
613 struct smb2_err_rsp *err_buf = NULL;
614 struct smb2_symlink_err_rsp *symlink;
615 unsigned int sub_len, sub_offset;
616
617 cifs_dbg(FYI, "%s: path: %s\n", __func__, full_path);
618
619 utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb);
620 if (!utf16_path)
621 return -ENOMEM;
622
623 oparms.tcon = tcon;
624 oparms.desired_access = FILE_READ_ATTRIBUTES;
625 oparms.disposition = FILE_OPEN;
626 oparms.create_options = 0;
627 oparms.fid = &fid;
628 oparms.reconnect = false;
629
630 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, &err_buf);
631
632 if (!rc || !err_buf) {
633 kfree(utf16_path);
634 return -ENOENT;
635 }
636 /* open must fail on symlink - reset rc */
637 rc = 0;
638 symlink = (struct smb2_symlink_err_rsp *)err_buf->ErrorData;
639 sub_len = le16_to_cpu(symlink->SubstituteNameLength);
640 sub_offset = le16_to_cpu(symlink->SubstituteNameOffset);
641 *target_path = cifs_strndup_from_utf16(
642 (char *)symlink->PathBuffer + sub_offset,
643 sub_len, true, cifs_sb->local_nls);
644 if (!(*target_path)) {
645 kfree(utf16_path);
646 return -ENOMEM;
647 }
648 convert_delimiter(*target_path, '/');
649 cifs_dbg(FYI, "%s: target path: %s\n", __func__, *target_path);
650 kfree(utf16_path);
651 return rc;
652}
653
654static void
655smb2_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
656 unsigned int epoch, bool *purge_cache)
657{
658 oplock &= 0xFF;
659 if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE)
660 return;
661 if (oplock == SMB2_OPLOCK_LEVEL_BATCH) {
662 cinode->oplock = CIFS_CACHE_RHW_FLG;
663 cifs_dbg(FYI, "Batch Oplock granted on inode %p\n",
664 &cinode->vfs_inode);
665 } else if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE) {
666 cinode->oplock = CIFS_CACHE_RW_FLG;
667 cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n",
668 &cinode->vfs_inode);
669 } else if (oplock == SMB2_OPLOCK_LEVEL_II) {
670 cinode->oplock = CIFS_CACHE_READ_FLG;
671 cifs_dbg(FYI, "Level II Oplock granted on inode %p\n",
672 &cinode->vfs_inode);
673 } else
674 cinode->oplock = 0;
675}
676
677static void
678smb21_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
679 unsigned int epoch, bool *purge_cache)
680{
681 char message[5] = {0};
682
683 oplock &= 0xFF;
684 if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE)
685 return;
686
687 cinode->oplock = 0;
688 if (oplock & SMB2_LEASE_READ_CACHING_HE) {
689 cinode->oplock |= CIFS_CACHE_READ_FLG;
690 strcat(message, "R");
691 }
692 if (oplock & SMB2_LEASE_HANDLE_CACHING_HE) {
693 cinode->oplock |= CIFS_CACHE_HANDLE_FLG;
694 strcat(message, "H");
695 }
696 if (oplock & SMB2_LEASE_WRITE_CACHING_HE) {
697 cinode->oplock |= CIFS_CACHE_WRITE_FLG;
698 strcat(message, "W");
699 }
700 if (!cinode->oplock)
701 strcat(message, "None");
702 cifs_dbg(FYI, "%s Lease granted on inode %p\n", message,
703 &cinode->vfs_inode);
704}
705
706static void
707smb3_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
708 unsigned int epoch, bool *purge_cache)
709{
710 unsigned int old_oplock = cinode->oplock;
711
712 smb21_set_oplock_level(cinode, oplock, epoch, purge_cache);
713
714 if (purge_cache) {
715 *purge_cache = false;
716 if (old_oplock == CIFS_CACHE_READ_FLG) {
717 if (cinode->oplock == CIFS_CACHE_READ_FLG &&
718 (epoch - cinode->epoch > 0))
719 *purge_cache = true;
720 else if (cinode->oplock == CIFS_CACHE_RH_FLG &&
721 (epoch - cinode->epoch > 1))
722 *purge_cache = true;
723 else if (cinode->oplock == CIFS_CACHE_RHW_FLG &&
724 (epoch - cinode->epoch > 1))
725 *purge_cache = true;
726 else if (cinode->oplock == 0 &&
727 (epoch - cinode->epoch > 0))
728 *purge_cache = true;
729 } else if (old_oplock == CIFS_CACHE_RH_FLG) {
730 if (cinode->oplock == CIFS_CACHE_RH_FLG &&
731 (epoch - cinode->epoch > 0))
732 *purge_cache = true;
733 else if (cinode->oplock == CIFS_CACHE_RHW_FLG &&
734 (epoch - cinode->epoch > 1))
735 *purge_cache = true;
736 }
737 cinode->epoch = epoch;
738 }
739}
740
741static bool
742smb2_is_read_op(__u32 oplock)
743{
744 return oplock == SMB2_OPLOCK_LEVEL_II;
745}
746
747static bool
748smb21_is_read_op(__u32 oplock)
749{
750 return (oplock & SMB2_LEASE_READ_CACHING_HE) &&
751 !(oplock & SMB2_LEASE_WRITE_CACHING_HE);
752}
753
754static __le32
755map_oplock_to_lease(u8 oplock)
756{
757 if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE)
758 return SMB2_LEASE_WRITE_CACHING | SMB2_LEASE_READ_CACHING;
759 else if (oplock == SMB2_OPLOCK_LEVEL_II)
760 return SMB2_LEASE_READ_CACHING;
761 else if (oplock == SMB2_OPLOCK_LEVEL_BATCH)
762 return SMB2_LEASE_HANDLE_CACHING | SMB2_LEASE_READ_CACHING |
763 SMB2_LEASE_WRITE_CACHING;
764 return 0;
765}
766
767static char *
768smb2_create_lease_buf(u8 *lease_key, u8 oplock)
769{
770 struct create_lease *buf;
771
772 buf = kzalloc(sizeof(struct create_lease), GFP_KERNEL);
773 if (!buf)
774 return NULL;
775
776 buf->lcontext.LeaseKeyLow = cpu_to_le64(*((u64 *)lease_key));
777 buf->lcontext.LeaseKeyHigh = cpu_to_le64(*((u64 *)(lease_key + 8)));
778 buf->lcontext.LeaseState = map_oplock_to_lease(oplock);
779
780 buf->ccontext.DataOffset = cpu_to_le16(offsetof
781 (struct create_lease, lcontext));
782 buf->ccontext.DataLength = cpu_to_le32(sizeof(struct lease_context));
783 buf->ccontext.NameOffset = cpu_to_le16(offsetof
784 (struct create_lease, Name));
785 buf->ccontext.NameLength = cpu_to_le16(4);
786 buf->Name[0] = 'R';
787 buf->Name[1] = 'q';
788 buf->Name[2] = 'L';
789 buf->Name[3] = 's';
790 return (char *)buf;
791}
792
793static char *
794smb3_create_lease_buf(u8 *lease_key, u8 oplock)
795{
796 struct create_lease_v2 *buf;
797
798 buf = kzalloc(sizeof(struct create_lease_v2), GFP_KERNEL);
799 if (!buf)
800 return NULL;
801
802 buf->lcontext.LeaseKeyLow = cpu_to_le64(*((u64 *)lease_key));
803 buf->lcontext.LeaseKeyHigh = cpu_to_le64(*((u64 *)(lease_key + 8)));
804 buf->lcontext.LeaseState = map_oplock_to_lease(oplock);
805
806 buf->ccontext.DataOffset = cpu_to_le16(offsetof
807 (struct create_lease_v2, lcontext));
808 buf->ccontext.DataLength = cpu_to_le32(sizeof(struct lease_context_v2));
809 buf->ccontext.NameOffset = cpu_to_le16(offsetof
810 (struct create_lease_v2, Name));
811 buf->ccontext.NameLength = cpu_to_le16(4);
812 buf->Name[0] = 'R';
813 buf->Name[1] = 'q';
814 buf->Name[2] = 'L';
815 buf->Name[3] = 's';
816 return (char *)buf;
817}
818
819static __u8
820smb2_parse_lease_buf(void *buf, unsigned int *epoch)
821{
822 struct create_lease *lc = (struct create_lease *)buf;
823
824 *epoch = 0; /* not used */
825 if (lc->lcontext.LeaseFlags & SMB2_LEASE_FLAG_BREAK_IN_PROGRESS)
826 return SMB2_OPLOCK_LEVEL_NOCHANGE;
827 return le32_to_cpu(lc->lcontext.LeaseState);
828}
829
830static __u8
831smb3_parse_lease_buf(void *buf, unsigned int *epoch)
832{
833 struct create_lease_v2 *lc = (struct create_lease_v2 *)buf;
834
835 *epoch = le16_to_cpu(lc->lcontext.Epoch);
836 if (lc->lcontext.LeaseFlags & SMB2_LEASE_FLAG_BREAK_IN_PROGRESS)
837 return SMB2_OPLOCK_LEVEL_NOCHANGE;
838 return le32_to_cpu(lc->lcontext.LeaseState);
839}
840
841struct smb_version_operations smb20_operations = {
600 .compare_fids = smb2_compare_fids, 842 .compare_fids = smb2_compare_fids,
601 .setup_request = smb2_setup_request, 843 .setup_request = smb2_setup_request,
602 .setup_async_request = smb2_setup_async_request, 844 .setup_async_request = smb2_setup_async_request,
@@ -638,6 +880,7 @@ struct smb_version_operations smb21_operations = {
638 .unlink = smb2_unlink, 880 .unlink = smb2_unlink,
639 .rename = smb2_rename_path, 881 .rename = smb2_rename_path,
640 .create_hardlink = smb2_create_hardlink, 882 .create_hardlink = smb2_create_hardlink,
883 .query_symlink = smb2_query_symlink,
641 .open = smb2_open_file, 884 .open = smb2_open_file,
642 .set_fid = smb2_set_fid, 885 .set_fid = smb2_set_fid,
643 .close = smb2_close_file, 886 .close = smb2_close_file,
@@ -660,8 +903,82 @@ struct smb_version_operations smb21_operations = {
660 .set_lease_key = smb2_set_lease_key, 903 .set_lease_key = smb2_set_lease_key,
661 .new_lease_key = smb2_new_lease_key, 904 .new_lease_key = smb2_new_lease_key,
662 .calc_signature = smb2_calc_signature, 905 .calc_signature = smb2_calc_signature,
906 .is_read_op = smb2_is_read_op,
907 .set_oplock_level = smb2_set_oplock_level,
908 .create_lease_buf = smb2_create_lease_buf,
909 .parse_lease_buf = smb2_parse_lease_buf,
663}; 910};
664 911
912struct smb_version_operations smb21_operations = {
913 .compare_fids = smb2_compare_fids,
914 .setup_request = smb2_setup_request,
915 .setup_async_request = smb2_setup_async_request,
916 .check_receive = smb2_check_receive,
917 .add_credits = smb2_add_credits,
918 .set_credits = smb2_set_credits,
919 .get_credits_field = smb2_get_credits_field,
920 .get_credits = smb2_get_credits,
921 .get_next_mid = smb2_get_next_mid,
922 .read_data_offset = smb2_read_data_offset,
923 .read_data_length = smb2_read_data_length,
924 .map_error = map_smb2_to_linux_error,
925 .find_mid = smb2_find_mid,
926 .check_message = smb2_check_message,
927 .dump_detail = smb2_dump_detail,
928 .clear_stats = smb2_clear_stats,
929 .print_stats = smb2_print_stats,
930 .is_oplock_break = smb2_is_valid_oplock_break,
931 .need_neg = smb2_need_neg,
932 .negotiate = smb2_negotiate,
933 .negotiate_wsize = smb2_negotiate_wsize,
934 .negotiate_rsize = smb2_negotiate_rsize,
935 .sess_setup = SMB2_sess_setup,
936 .logoff = SMB2_logoff,
937 .tree_connect = SMB2_tcon,
938 .tree_disconnect = SMB2_tdis,
939 .is_path_accessible = smb2_is_path_accessible,
940 .can_echo = smb2_can_echo,
941 .echo = SMB2_echo,
942 .query_path_info = smb2_query_path_info,
943 .get_srv_inum = smb2_get_srv_inum,
944 .query_file_info = smb2_query_file_info,
945 .set_path_size = smb2_set_path_size,
946 .set_file_size = smb2_set_file_size,
947 .set_file_info = smb2_set_file_info,
948 .mkdir = smb2_mkdir,
949 .mkdir_setinfo = smb2_mkdir_setinfo,
950 .rmdir = smb2_rmdir,
951 .unlink = smb2_unlink,
952 .rename = smb2_rename_path,
953 .create_hardlink = smb2_create_hardlink,
954 .query_symlink = smb2_query_symlink,
955 .open = smb2_open_file,
956 .set_fid = smb2_set_fid,
957 .close = smb2_close_file,
958 .flush = smb2_flush_file,
959 .async_readv = smb2_async_readv,
960 .async_writev = smb2_async_writev,
961 .sync_read = smb2_sync_read,
962 .sync_write = smb2_sync_write,
963 .query_dir_first = smb2_query_dir_first,
964 .query_dir_next = smb2_query_dir_next,
965 .close_dir = smb2_close_dir,
966 .calc_smb_size = smb2_calc_size,
967 .is_status_pending = smb2_is_status_pending,
968 .oplock_response = smb2_oplock_response,
969 .queryfs = smb2_queryfs,
970 .mand_lock = smb2_mand_lock,
971 .mand_unlock_range = smb2_unlock_range,
972 .push_mand_locks = smb2_push_mandatory_locks,
973 .get_lease_key = smb2_get_lease_key,
974 .set_lease_key = smb2_set_lease_key,
975 .new_lease_key = smb2_new_lease_key,
976 .calc_signature = smb2_calc_signature,
977 .is_read_op = smb21_is_read_op,
978 .set_oplock_level = smb21_set_oplock_level,
979 .create_lease_buf = smb2_create_lease_buf,
980 .parse_lease_buf = smb2_parse_lease_buf,
981};
665 982
666struct smb_version_operations smb30_operations = { 983struct smb_version_operations smb30_operations = {
667 .compare_fids = smb2_compare_fids, 984 .compare_fids = smb2_compare_fids,
@@ -706,6 +1023,7 @@ struct smb_version_operations smb30_operations = {
706 .unlink = smb2_unlink, 1023 .unlink = smb2_unlink,
707 .rename = smb2_rename_path, 1024 .rename = smb2_rename_path,
708 .create_hardlink = smb2_create_hardlink, 1025 .create_hardlink = smb2_create_hardlink,
1026 .query_symlink = smb2_query_symlink,
709 .open = smb2_open_file, 1027 .open = smb2_open_file,
710 .set_fid = smb2_set_fid, 1028 .set_fid = smb2_set_fid,
711 .close = smb2_close_file, 1029 .close = smb2_close_file,
@@ -729,6 +1047,10 @@ struct smb_version_operations smb30_operations = {
729 .new_lease_key = smb2_new_lease_key, 1047 .new_lease_key = smb2_new_lease_key,
730 .generate_signingkey = generate_smb3signingkey, 1048 .generate_signingkey = generate_smb3signingkey,
731 .calc_signature = smb3_calc_signature, 1049 .calc_signature = smb3_calc_signature,
1050 .is_read_op = smb21_is_read_op,
1051 .set_oplock_level = smb3_set_oplock_level,
1052 .create_lease_buf = smb3_create_lease_buf,
1053 .parse_lease_buf = smb3_parse_lease_buf,
732}; 1054};
733 1055
734struct smb_version_values smb20_values = { 1056struct smb_version_values smb20_values = {
@@ -746,9 +1068,9 @@ struct smb_version_values smb20_values = {
746 .cap_unix = 0, 1068 .cap_unix = 0,
747 .cap_nt_find = SMB2_NT_FIND, 1069 .cap_nt_find = SMB2_NT_FIND,
748 .cap_large_files = SMB2_LARGE_FILES, 1070 .cap_large_files = SMB2_LARGE_FILES,
749 .oplock_read = SMB2_OPLOCK_LEVEL_II,
750 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED, 1071 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED,
751 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED, 1072 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED,
1073 .create_lease_size = sizeof(struct create_lease),
752}; 1074};
753 1075
754struct smb_version_values smb21_values = { 1076struct smb_version_values smb21_values = {
@@ -766,9 +1088,9 @@ struct smb_version_values smb21_values = {
766 .cap_unix = 0, 1088 .cap_unix = 0,
767 .cap_nt_find = SMB2_NT_FIND, 1089 .cap_nt_find = SMB2_NT_FIND,
768 .cap_large_files = SMB2_LARGE_FILES, 1090 .cap_large_files = SMB2_LARGE_FILES,
769 .oplock_read = SMB2_OPLOCK_LEVEL_II,
770 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED, 1091 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED,
771 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED, 1092 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED,
1093 .create_lease_size = sizeof(struct create_lease),
772}; 1094};
773 1095
774struct smb_version_values smb30_values = { 1096struct smb_version_values smb30_values = {
@@ -786,9 +1108,9 @@ struct smb_version_values smb30_values = {
786 .cap_unix = 0, 1108 .cap_unix = 0,
787 .cap_nt_find = SMB2_NT_FIND, 1109 .cap_nt_find = SMB2_NT_FIND,
788 .cap_large_files = SMB2_LARGE_FILES, 1110 .cap_large_files = SMB2_LARGE_FILES,
789 .oplock_read = SMB2_OPLOCK_LEVEL_II,
790 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED, 1111 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED,
791 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED, 1112 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED,
1113 .create_lease_size = sizeof(struct create_lease_v2),
792}; 1114};
793 1115
794struct smb_version_values smb302_values = { 1116struct smb_version_values smb302_values = {
@@ -806,7 +1128,7 @@ struct smb_version_values smb302_values = {
806 .cap_unix = 0, 1128 .cap_unix = 0,
807 .cap_nt_find = SMB2_NT_FIND, 1129 .cap_nt_find = SMB2_NT_FIND,
808 .cap_large_files = SMB2_LARGE_FILES, 1130 .cap_large_files = SMB2_LARGE_FILES,
809 .oplock_read = SMB2_OPLOCK_LEVEL_II,
810 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED, 1131 .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED,
811 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED, 1132 .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED,
1133 .create_lease_size = sizeof(struct create_lease_v2),
812}; 1134};