Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '5.6-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
"Four small CIFS/SMB3 fixes. One (the EA overflow fix) for stable"

* tag '5.6-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: make sure we do not overflow the max EA buffer size
cifs: enable change notification for SMB2.1 dialect
cifs: Fix mode output in debugging statements
cifs: fix mount option display for sec=krb5i

+44 -6
+2 -2
fs/cifs/cifsacl.c
··· 601 601 ((flags & FILE_EXEC_RIGHTS) == FILE_EXEC_RIGHTS)) 602 602 *pmode |= (S_IXUGO & (*pbits_to_set)); 603 603 604 - cifs_dbg(NOISY, "access flags 0x%x mode now 0x%x\n", flags, *pmode); 604 + cifs_dbg(NOISY, "access flags 0x%x mode now %04o\n", flags, *pmode); 605 605 return; 606 606 } 607 607 ··· 630 630 if (mode & S_IXUGO) 631 631 *pace_flags |= SET_FILE_EXEC_RIGHTS; 632 632 633 - cifs_dbg(NOISY, "mode: 0x%x, access flags now 0x%x\n", 633 + cifs_dbg(NOISY, "mode: %04o, access flags now 0x%x\n", 634 634 mode, *pace_flags); 635 635 return; 636 636 }
+5 -1
fs/cifs/cifsfs.c
··· 414 414 seq_puts(s, "ntlm"); 415 415 break; 416 416 case Kerberos: 417 - seq_printf(s, "krb5,cruid=%u", from_kuid_munged(&init_user_ns,ses->cred_uid)); 417 + seq_puts(s, "krb5"); 418 418 break; 419 419 case RawNTLMSSP: 420 420 seq_puts(s, "ntlmssp"); ··· 427 427 428 428 if (ses->sign) 429 429 seq_puts(s, "i"); 430 + 431 + if (ses->sectype == Kerberos) 432 + seq_printf(s, ",cruid=%u", 433 + from_kuid_munged(&init_user_ns, ses->cred_uid)); 430 434 } 431 435 432 436 static void
+1 -1
fs/cifs/connect.c
··· 4151 4151 cifs_sb->mnt_gid = pvolume_info->linux_gid; 4152 4152 cifs_sb->mnt_file_mode = pvolume_info->file_mode; 4153 4153 cifs_sb->mnt_dir_mode = pvolume_info->dir_mode; 4154 - cifs_dbg(FYI, "file mode: 0x%hx dir mode: 0x%hx\n", 4154 + cifs_dbg(FYI, "file mode: %04ho dir mode: %04ho\n", 4155 4155 cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); 4156 4156 4157 4157 cifs_sb->actimeo = pvolume_info->actimeo;
+1 -1
fs/cifs/inode.c
··· 1648 1648 struct TCP_Server_Info *server; 1649 1649 char *full_path; 1650 1650 1651 - cifs_dbg(FYI, "In cifs_mkdir, mode = 0x%hx inode = 0x%p\n", 1651 + cifs_dbg(FYI, "In cifs_mkdir, mode = %04ho inode = 0x%p\n", 1652 1652 mode, inode); 1653 1653 1654 1654 cifs_sb = CIFS_SB(inode->i_sb);
+35 -1
fs/cifs/smb2ops.c
··· 1116 1116 void *data[1]; 1117 1117 struct smb2_file_full_ea_info *ea = NULL; 1118 1118 struct kvec close_iov[1]; 1119 - int rc; 1119 + struct smb2_query_info_rsp *rsp; 1120 + int rc, used_len = 0; 1120 1121 1121 1122 if (smb3_encryption_required(tcon)) 1122 1123 flags |= CIFS_TRANSFORM_REQ; ··· 1140 1139 cifs_sb); 1141 1140 if (rc == -ENODATA) 1142 1141 goto sea_exit; 1142 + } else { 1143 + /* If we are adding a attribute we should first check 1144 + * if there will be enough space available to store 1145 + * the new EA. If not we should not add it since we 1146 + * would not be able to even read the EAs back. 1147 + */ 1148 + rc = smb2_query_info_compound(xid, tcon, utf16_path, 1149 + FILE_READ_EA, 1150 + FILE_FULL_EA_INFORMATION, 1151 + SMB2_O_INFO_FILE, 1152 + CIFSMaxBufSize - 1153 + MAX_SMB2_CREATE_RESPONSE_SIZE - 1154 + MAX_SMB2_CLOSE_RESPONSE_SIZE, 1155 + &rsp_iov[1], &resp_buftype[1], cifs_sb); 1156 + if (rc == 0) { 1157 + rsp = (struct smb2_query_info_rsp *)rsp_iov[1].iov_base; 1158 + used_len = le32_to_cpu(rsp->OutputBufferLength); 1159 + } 1160 + free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base); 1161 + resp_buftype[1] = CIFS_NO_BUFFER; 1162 + memset(&rsp_iov[1], 0, sizeof(rsp_iov[1])); 1163 + rc = 0; 1164 + 1165 + /* Use a fudge factor of 256 bytes in case we collide 1166 + * with a different set_EAs command. 1167 + */ 1168 + if(CIFSMaxBufSize - MAX_SMB2_CREATE_RESPONSE_SIZE - 1169 + MAX_SMB2_CLOSE_RESPONSE_SIZE - 256 < 1170 + used_len + ea_name_len + ea_value_len + 1) { 1171 + rc = -ENOSPC; 1172 + goto sea_exit; 1173 + } 1143 1174 } 1144 1175 } 1145 1176 ··· 4828 4795 .wp_retry_size = smb2_wp_retry_size, 4829 4796 .dir_needs_close = smb2_dir_needs_close, 4830 4797 .enum_snapshots = smb3_enum_snapshots, 4798 + .notify = smb3_notify, 4831 4799 .get_dfs_refer = smb2_get_dfs_refer, 4832 4800 .select_sectype = smb2_select_sectype, 4833 4801 #ifdef CONFIG_CIFS_XATTR