- 17 4月, 2014 1 次提交
-
-
由 Cyril Roelandt 提交于
In SMB2_set_compression(), the "res_key" variable is only initialized to NULL and later kfreed. It is therefore useless and should be removed. Found with the following semantic patch: <smpl> @@ identifier foo; identifier f; type T; @@ * f(...) { ... * T *foo = NULL; ... when forall when != foo * kfree(foo); ... } </smpl> Signed-off-by: NCyril Roelandt <tipecaml@gmail.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 15 2月, 2014 1 次提交
-
-
由 Pavel Shilovsky 提交于
SMB3 servers can respond with MaxTransactSize of more than 4M that can cause a memory allocation error returned from kmalloc in a lock codepath. Also the client doesn't support multicredit requests now and allows buffer sizes of 65536 bytes only. Set MaxTransactSize to this maximum supported value. Cc: stable@vger.kernel.org # 3.7+ Signed-off-by: NPavel Shilovsky <piastry@etersoft.ru> Acked-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 08 2月, 2014 1 次提交
-
-
由 Steve French 提交于
In the event that a send fails in an uncached write, or we end up needing to reissue it (-EAGAIN case), we'll kfree the wdata but the pages currently leak. Fix this by adding a new kref release routine for uncached writedata that releases the pages, and have the uncached codepaths use that. [original patch by Jeff modified to fix minor formatting problems] Signed-off-by: NJeff Layton <jlayton@redhat.com> Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru> Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 20 11月, 2013 1 次提交
-
-
由 Steve French 提交于
When we are running SMB3 or SMB3.02 connections which are signed we need to validate the protocol negotiation information, to ensure that the negotiate protocol response was not tampered with. Add the missing FSCTL which is sent at mount time (immediately after the SMB3 Tree Connect) to validate that the capabilities match what we think the server sent. "Secure dialect negotiation is introduced in SMB3 to protect against man-in-the-middle attempt to downgrade dialect negotiation. The idea is to prevent an eavesdropper from downgrading the initially negotiated dialect and capabilities between the client and the server." For more explanation see 2.2.31.4 of MS-SMB2 or http://blogs.msdn.com/b/openspecification/archive/2012/06/28/smb3-secure-dialect-negotiation.aspxReviewed-by: NPavel Shilovsky <piastry@etersoft.ru> Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 19 11月, 2013 2 次提交
-
-
由 Steve French 提交于
Remove an unneeded goto (and also was duplicated goto target name). Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
This third version of the patch, incorparating feedback from David Disseldorp extends the ability of copychunk (refcopy) over smb2/smb3 mounts to handle servers with smaller than usual maximum chunk sizes and also fixes it to handle files bigger than the maximum chunk sizes In the future this can be extended further to handle sending multiple chunk requests in on SMB2 ioctl request which will further improve performance, but even with one 1MB chunk per request the speedup on cp is quite large. Reviewed-by: NDavid Disseldorp <ddiss@samba.org> Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 16 11月, 2013 2 次提交
-
-
由 Steve French 提交于
We do not support SMB3 encryption yet, warn if server responds that SMB3 encryption is mandatory. Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
Patch 2 of the copy chunk series (the final patch will use these to handle copies of files larger than the chunk size. We set the same defaults that Windows and Samba expect for CopyChunk. Signed-off-by: NSteve French <smfrench@gmail.com> Reviewed-by: NDavid Disseldorp <ddiss@samba.org>
-
- 03 11月, 2013 2 次提交
-
-
由 Steven French 提交于
In SMB3 it is now possible to query the file system alignment info, and the preferred (for performance) sector size and whether the underlying disk has no seek penalty (like SSD). Query this information at mount time for SMB3, and make it visible in /proc/fs/cifs/DebugData for debugging purposes. This alignment information and preferred sector size info will be helpful for the copy offload patches to setup the right chunks in the CopyChunk requests. Presumably the knowledge that the underlying disk is SSD could also help us make better readahead and writebehind decisions (something to look at in the future). Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steven French 提交于
Currently SMB2 and SMB3 mounts do not query the device information at mount time from the server as is done for cifs. These can be useful for debugging. This is a minor patch, that extends the previous one (which added ability to query file system attributes at mount time - this returns the device characteristics - also via in /proc/fs/cifs/DebugData) Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 28 10月, 2013 3 次提交
-
-
由 Steve French 提交于
Currently SMB2 and SMB3 mounts do not query the file system attributes from the server at mount time as is done for cifs. These can be useful for debugging. Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
Allow cifs/smb2/smb3 to return whether or not a file is compressed via lsattr, and allow SMB2/SMB3 to set the per-file compression flag ("chattr +c filename" on an smb3 mount). Windows users often set the compressed flag (it can be done from the desktop and file manager). David Disseldorp has patches to Samba server to support this (at least on btrfs) which are complementary to this Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
We were off by one calculating the length of ioctls in some cases because the protocol specification for SMB2 ioctl includes a mininum one byte payload but not all SMB2 ioctl requests actually have a data buffer to send. We were also not zeroing out the return buffer (in case of error this is helpful). Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 07 10月, 2013 1 次提交
-
-
由 Shirish Pargaonkar 提交于
Do not send SMB2 Logoff command when reconnecting, the way smb1 code base works. Also, no need to wait for a credit for an echo command when one is already in flight. Without these changes, umount command hangs if the server is unresponsive e.g. hibernating. Signed-off-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com> Acked-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <smfrench@us.ibm.com>
-
- 10 9月, 2013 4 次提交
-
-
由 Pavel Shilovsky 提交于
that force a client to purge cache pages when a server requests it. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Pavel Shilovsky 提交于
Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Pavel Shilovsky 提交于
to make adding new types of lease buffers easier. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Pavel Shilovsky 提交于
and separate smb20_operations struct. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 09 9月, 2013 5 次提交
-
-
由 Shirish Pargaonkar 提交于
Switch smb2 code to use per session session key and smb3 code to use per session signing key instead of per connection key to generate signatures. For that, we need to find a session to fetch the session key to generate signature to match for every request and response packet. We also forgo checking signature for a session setup response from the server. Acked-by: NJeff Layton <jlayton@samba.org> Signed-off-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Shirish Pargaonkar 提交于
Add a variable specific to NTLMSSP authentication to determine whether to exchange keys during negotiation and authentication phases. Since session key for smb1 is per smb connection, once a very first sesion is established, there is no need for key exchange during subsequent session setups. As a result, smb1 session setup code sets this variable as false. Since session key for smb2 and smb3 is per smb connection, we need to exchange keys to generate session key for every sesion being established. As a result, smb2/3 session setup code sets this variable as true. Acked-by: NJeff Layton <jlayton@samba.org> Signed-off-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Shirish Pargaonkar 提交于
Move the post (successful) session setup code to respective dialect routines. For smb1, session key is per smb connection. For smb2/smb3, session key is per smb session. If client and server do not require signing, free session key for smb1/2/3. If client and server require signing smb1 - Copy (kmemdup) session key for the first session to connection. Free session key of that and subsequent sessions on this connection. smb2 - For every session, keep the session key and free it when the session is being shutdown. smb3 - For every session, generate the smb3 signing key using the session key and then free the session key. There are two unrelated line formatting changes as well. Reviewed-by: NJeff Layton <jlayton@samba.org> Signed-off-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Wei Yongjun 提交于
Convert cpu_to_le32(le32_to_cpu(E1) + E2) to use le32_add_cpu(). Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Pavel Shilovsky 提交于
that allows to access files through symlink created on a server. Acked-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 11 7月, 2013 8 次提交
-
-
由 Steve French 提交于
Fix endian warning: CHECK fs/cifs/smb2pdu.c fs/cifs/smb2pdu.c:1068:40: warning: incorrect type in assignment (different base types) fs/cifs/smb2pdu.c:1068:40: expected restricted __le32 [usertype] Next fs/cifs/smb2pdu.c:1068:40: got unsigned long Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Pavel Shilovsky 提交于
On reconnects, we need to reopen file and then obtain all byte-range locks held by the client. SMB2 protocol provides feature to make this process atomic by reconnecting to the same file handle with all it's byte-range locks. This patch adds this capability for SMB2 shares. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteven French <steven@steven-GA-970A-DS3.(none)>
-
由 Pavel Shilovsky 提交于
to prepare it for further durable handle reconnect processing. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteven French <steven@steven-GA-970A-DS3.(none)>
-
由 Pavel Shilovsky 提交于
by passing durable context together with a handle caching lease or batch oplock. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteven French <steven@steven-GA-970A-DS3.(none)>
-
由 Pavel Shilovsky 提交于
to make it easier to add other create context further. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteven French <steven@steven-GA-970A-DS3.(none)>
-
由 Pavel Shilovsky 提交于
by passing a filename to a separate iovec regardless of its length. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteven French <steven@steven-GA-970A-DS3.(none)>
-
由 Pavel Shilovsky 提交于
and eliminated unused file_attribute parms of SMB2_open. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteven French <steven@steven-GA-970A-DS3.(none)>
-
由 Pavel Shilovsky 提交于
to prevent missing RqLs context if it's not the first one. Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org> Signed-off-by: NSteven French <steven@steven-GA-970A-DS3.(none)>
-
- 27 6月, 2013 6 次提交
-
-
由 Steve French 提交于
If we would set SMB2_FLAGS_DFS_OPERATIONS on open we also would have to pass the path on the Open SMB prefixed by \\server\share. Not sure when we would need to do the augmented path (if ever) and setting this flag breaks the SMB2 open operation since it is illegal to send an empty path name (without \\server\share prefix) when the DFS flag is set in the SMB open header. We could consider setting the flag on all operations other than open but it is safer to net set it for now. Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
Dan Carpenter wrote: The patch 7f420cee8bd6: "[CIFS] Charge at least one credit, if server says that it supports multicredit" from Jun 23, 2013, leads to the following Smatch complaint: fs/cifs/smb2pdu.c:120 smb2_hdr_assemble() warn: variable dereferenced before check 'tcon->ses' (see line 115) CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
According to MS-SMB2 section 2.2.4: if no blob, client picks default which for us will be ses->sectype = RawNTLMSSP; but for time being this is also our only auth choice so doesn't matter as long as we include this fix (which does not treat the empty SecurityBuffer as an error as the code had been doing). We just found a server which sets blob length to zero expecting raw so this fixes negotiation with that server. Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
This worker function is needed to send SMB2 fsctl (and ioctl) requests including: validating negotiation info (secure negotiate) querying the servers network interfaces copy offload (refcopy) Followon patches for the above three will use this. This patch also does general validation of the response. In the future, as David Disseldorp notes, for the copychunk ioctl case, we will want to enhance the response processing to allow returning the chunk request limits to the caller (even though the server returns an error, in that case we would return data that the caller could use - see 2.2.32.1). See MS-SMB2 Section 2.2.31 for more details on format of fsctl. Acked-by: NPavel Shilovsky <piastry@etersoft.ru> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Steve French 提交于
In SMB2.1 and later the server will usually set the large MTU flag, and we need to charge at least one credit, if server says that since it supports multicredit. Windows seems to let us get away with putting a zero there, but they confirmed that it is wrong and the spec says to put one there (if the request is under 64K and the CAP_LARGE_MTU was returned during protocol negotiation by the server. CC: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: NSteve French <smfrench@gmail.com>
-
由 Zhao Hongjiang 提交于
for NUL terminated string, need alway set '\0' in the end. Signed-off-by: NZhao Hongjiang <zhaohongjiang@huawei.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-
- 24 6月, 2013 3 次提交
-
-
由 Steve French 提交于
SMB3 protocol adds various optional per-share capabilities (and SMB3.02 adds one more beyond that). Add ability to dump (/proc/fs/cifs/DebugData) the share capabilities and share flags to improve debugging. Signed-off-by: NSteve French <smfrench@gmail.com> Acked-by: NJeff Layton <jlayton@redhat.com>
-
由 Steve French 提交于
The new Windows update supports SMB3.02 dialect, a minor update to SMB3. This patch adds support for mounting with vers=3.02 Signed-off-by: NSteve French <smfrench@gmail.com> Reviewed-by: NJeff Layton <jlayton@redhat.com>
-
由 Steve French 提交于
Fix minor endian error in Jeff's auth rewrite Reviewed-by: NJeff Laytonn <jlayton@redhat.com> Signed-off-by: NSteve French <smfrench@gmail.com>
-