- 13 5月, 2008 2 次提交
-
-
由 Steve French 提交于
Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Jeff Layton 提交于
when unix extensions and cifsacl support are disabled. These permissions changes are "ephemeral" however. They are lost whenever a share is mounted and unmounted, or when memory pressure forces the inode out of the cache. Because of this, we'd like to introduce a behavior change to make CIFS behave more like local DOS/Windows filesystems. When unix extensions and cifsacl support aren't enabled, then don't silently ignore changes to permission bits that can't be reflected on the server. Still, there may be people relying on the current behavior for certain applications. This patch adds a new "dynperm" (and a corresponding "nodynperm") mount option that will be intended to make the client fall back to legacy behavior when setting these modes. Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 12 5月, 2008 3 次提交
-
-
由 Steve French 提交于
cifs_demultiplex_thread can exit under several conditions: 1) if it's signaled 2) if there's a problem with session setup 3) if kthread_stop is called on it The first two are problems. If kthread_stop is called on the thread, there is no guarantee that it will still be up. We need to have the thread stay up until kthread_stop is called on it. One option would be to not even try to tear things down until after kthread_stop is called. However, in the case where there is a problem setting up the session, there's no real reason to try continuing the loop. This patch allows the thread to clean up and prepare for exit under all three conditions, but it has the thread go to sleep until kthread_stop is called. This allows us to simplify the shutdown code somewhat since we can be reasonably sure that the thread won't exit after being signaled but before kthread_stop is called. It also removes the places where the thread itself set the tsk variable since it appeared that it could have a potential race where the thread might never be shut down. Signed-off-by: NJeff Layton <jlayton@redhat.com> Acked-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Jeff Layton 提交于
Clean up cifs_setattr a bit by adding a local inode pointer, and changing all of the direntry->d_inode references to it. This also adds a bit of micro-optimization. d_inode shouldn't change over the life of this function, so we only need to dereference it once. Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Cyrill Gorcunov 提交于
This patch cleans up cifs_find_tcp_session so it become less indented. Also the error of skipping IPv6 matched addresses fixed. Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 09 5月, 2008 1 次提交
-
-
由 Igor Mammedov 提交于
Signed-off-by: NIgor Mammedov <niallain@gmail.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 07 5月, 2008 2 次提交
-
-
由 Steve French 提交于
Was a holdover from the old kernel_thread based cifsd code. We needed to know that the thread had set the task variable before proceeding. Now that kthread_run returns the new task, this doesn't appear to be needed anymore. As best I can tell, this sleep was intended to try to prevent cifs_umount from freeing the cifsSesInfo struct before cifsd had exited. Now that cifsd is using the kthread API, we know that when kthread_stop returns that cifsd has exited, so I don't think this is needed any longer. Signed-off-by: NJeff Layton <jlayton@redhat.com> Acked-by: NChristop Hellwig <hch@infradead.org> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Steve French 提交于
Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 29 4月, 2008 1 次提交
-
-
由 Steve French 提交于
Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 16 4月, 2008 1 次提交
-
-
由 Steve French 提交于
If a tcon is being freed in call tconInfoFree, clean up any entries that may exist in global oplock queue as the tcon structure hanging off of those entries will be invalid and can cause oops while accesing any elements in the tcon structure. Signed-off-by: NShirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 16 2月, 2008 2 次提交
-
-
由 Steve French 提交于
Jeff Layton that we were converting \ to / in the posix path case which is not always right (depends on what the old delim was). CC: Jeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Igor Mammedov 提交于
Also add warning if posix path setting changes on reconnect Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 14 2月, 2008 1 次提交
-
-
由 Steve French 提交于
Currently, when we get a prefixpath as part of mount, the kernel only changes the first character to be a '/' or '\' depending on whether posix extensions are enabled. This is problematic as it expects mount.cifs to pass in the correct delimiter in the rest of the prefixpath. But, mount.cifs may not know *what* the correct delimiter is. It's a chicken and egg problem. Note that mount.cifs should not do conversion of the prefixpath - if we want posix behavior then '\' is legal in a path (and we have had bugs in the distant path to prove to me that customers sometimes have apps that require '\'). The kernel code assumes that the path passed in is posix (and current code will handle the first path component fine but was broken for Windows mounts for "deep" prefixpaths unless the user specified a prefixpath with '\' deep in it. So e.g. with current kernel code: 1) mount to //server/share/dir1 will work to all server types 2) mount to //server/share/dir1/subdir1 will work to Samba 3) mount to //server/share/dir1\\subdir1 will work to Windows But case two would fail to Windows without the fix. With the kernel cifs module fix case two now works. First analyzed by Jeff Layton and Simo Sorce CC: Jeff Layton <jlayton@redhat.com> CC: Simo Sorce <simo@samba.org> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 13 2月, 2008 1 次提交
-
-
由 Steve French 提交于
Christoph had noticed too many ifdefs in the CIFS code making it hard to read. This patch removes about a quarter of them from the C files in cifs by improving a few key ifdefs in the .h files. Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 25 1月, 2008 1 次提交
-
-
由 Steve French 提交于
Also includes a few minor changes suggested by Christoph Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 04 1月, 2008 1 次提交
-
-
由 Steve French 提交于
Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 31 12月, 2007 1 次提交
-
-
由 Jeff Layton 提交于
When cifs_mount finds an existing SMB session that it can use for a new mount, it does not check to see whether that session is in need of being reconnected. An easy way to reproduce: 1) mount //server/share1 2) watch /proc/fs/cifs/DebugData for the share to go DISCONNECTED 3) mount //server/share2 with same creds as in step 1. The second mount will fail because CIFSTCon returned -EAGAIN. If you do an operation in share1 and then reattempt the mount it will work (since the session is reestablished). The following patch fixes this by having cifs_mount check the status of the session when it picks an existing session and calling cifs_setup_session on it again if it's in need of reconnection. Thanks to Wojciech Pilorz for the initial bug report. Signed-off-by: NJeff Layton <jlayton@tupile.poochiereds.net> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 20 11月, 2007 1 次提交
-
-
由 Petr Tesarik 提交于
When retrying kernel_recvmsg() because of a short read, check returned length against the remaining length, not against total length. This avoids unneeded session reconnects which would otherwise occur when kernel_recvmsg() finally returns zero when asked to read zero bytes. Signed-off-by: NPetr Tesarik <ptesarik@suse.cz> Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 17 11月, 2007 3 次提交
-
-
由 Steve French 提交于
Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Jeff Layton 提交于
...and populate it with the hostname portion of the UNC string. Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Jeff Layton 提交于
Move all of the kfree's sprinkled in the middle of the function to the end, and have the code set rc and just goto there on error. Also zero out the password string before freeing it. Looks like this should also fix a potential memory leak of the prepath string if an error occurs near the end of the function. Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 14 11月, 2007 1 次提交
-
-
由 Steve French 提交于
request In SendReceive() function in transport.c - it memcpy's message payload into a buffer passed via out_buf param. The function assumes that all buffers are of size (CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) , unfortunately it is also called with smaller (MAX_CIFS_SMALL_BUFFER_SIZE) buffers. There are eight callers (SMB worker functions) which are primarily affected by this change: TreeDisconnect, uLogoff, Close, findClose, SetFileSize, SetFileTimes, Lock and PosixLock CC: Dave Kleikamp <shaggy@austin.ibm.com> CC: Przemyslaw Wegrzyn <czajnik@czajsoft.pl> Acked-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 13 11月, 2007 1 次提交
-
-
由 Trond Myklebust 提交于
...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers. Looking at the sock->op->shutdown() handlers, it looks as if all of them take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the RCV_SHUTDOWN/SEND_SHUTDOWN arguments. Add a helper, and then define the SHUT_* enum to ensure that kernel users of shutdown() don't get confused. Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com> Acked-by: NMark Fasheh <mark.fasheh@oracle.com> Acked-by: NDavid Howells <dhowells@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 10 11月, 2007 1 次提交
-
-
由 Jeff Layton 提交于
When a share is mounted using no username, cifs_mount sets volume_info.username as a NULL pointer, and the sesInfo userName as an empty string. The volume_info.username is passed to a couple of other functions to see if there is an existing unc or tcp connection that can be used. These functions assume that the username will be a valid string that can be passed to strncmp. If the pointer is NULL, then the kernel will oops if there's an existing session to which the string can be compared. This patch changes cifs_mount to set volume_info.username to an empty string in this situation, which prevents the oops and should make it so that the comparison to other null auth sessions match. Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 02 11月, 2007 1 次提交
-
-
由 Steve French 提交于
Also clean up ACL code Acked-by: NShirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 20 10月, 2007 1 次提交
-
-
由 Pavel Emelyanov 提交于
The task_struct->pid member is going to be deprecated, so start using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in the kernel. The first thing to start with is the pid, printed to dmesg - in this case we may safely use task_pid_nr(). Besides, printks produce more (much more) than a half of all the explicit pid usage. [akpm@linux-foundation.org: git-drm went and changed lots of stuff] Signed-off-by: NPavel Emelyanov <xemul@openvz.org> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 18 10月, 2007 1 次提交
-
-
由 Steve French 提交于
When kernel_recvmsg returns -EAGAIN or -ERESTARTSYS, then cifs_demultiplex_thread sleeps for a bit and then tries the read again. When it does this, it's not zeroing out the length and that throws off the value of total_read. Fix it to zero out the length. Can cause memory corruption: If kernel_recvmsg returns an error and total_read is a large enough value, then we'll end up going through the loop again. total_read will be a bogus value, as will (pdu_length-total_read). When this happens we end up calling kernel_recvmsg with a bogus value (possibly larger than the current iov_len). At that point, memcpy_toiovec can overrun iov. It will start walking up the stack, casting other things that are there to struct iovecs (since it assumes that it's been passed an array of them). Any pointer on the stack at an address above the kvec is a candidate for corruption here. Many thanks to Ulrich Obergfell for pointing this out. Signed-off-by: NJeff Layton <jlayton@redhat.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 17 10月, 2007 1 次提交
-
-
由 Cyrill Gorcunov 提交于
Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 05 10月, 2007 1 次提交
-
-
由 Steve French 提交于
Fixes two problems: 1) we dropped down to negotiating lanman if we did not recognize the mechanism (krb5 e.g.) 2) we did not stop cifsd (thus will fail when doing rmod cifs with slab free errors) when we fail tcon but have a bad session (which is the case in which signing is required but we don't allow signing on the client) It also turns on extended security flag in the header when passing "sec=krb5" on mount command (although kerberos support is not done of course) Acked-by: NJeff Layton <jlayton@redhat.com> CC: Shaggy <shaggy@us.ibm.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 04 10月, 2007 1 次提交
-
-
由 Mariusz Kozlowski 提交于
This patch does kmalloc + memset conversion to kzalloc and removes some redundant argument checks. Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 29 9月, 2007 1 次提交
-
-
由 Steve French 提交于
This allows cifs to mount to ipc shares (IPC$) which will allow user space applications to layer over authenticated cifs connections (useful for Wine and others that would want to put DCE/RPC over CIFS or run CIFS named pipes) Acked-by: NRob Shearman <rob@codeweavers.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 25 9月, 2007 1 次提交
-
-
由 Steve French 提交于
Add code to be able to dump CIFS ACL information when Query Posix ACL with cifsacl mount parm enabled. Signed-off-by: NShirish Pargoankar <shirishp@us.ibm.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 20 9月, 2007 2 次提交
-
-
由 Steve French 提交于
Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Steve French 提交于
A reasonably common NAS server returns an error on the SetFSInfo of the Unix capabilities. Log a message for this alerting the user that the server may have problems with the Unix extensions, and telling them what they can do to workaround it. Unfortunately the server does not return other clues that we could easily use to turn the Unix Extension support off automatically in this case (since they claim to support it). Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 15 9月, 2007 2 次提交
-
-
由 Steve French 提交于
Potential problem was noticed by Cyrill Gorcunov CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Steve French 提交于
Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 31 8月, 2007 3 次提交
-
-
由 Steve French 提交于
Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Steve French 提交于
Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
由 Steve French 提交于
cifs reconnect could end up happening incorrectly due to the small initial tcp recvmsg response. When the socket was within three bytes of being full and the recvmsg returned only 1 to 3 bytes of the initial 4 byte read of the RFC1001 length field. Fortunately this seems to be less common on more current kernels, but this fixes it so cifs tries to retrieve all 4 bytes of the initial tcp read. Signed-off-by: NShirish Pargoankar <shirishp@us.ibm.com> Signed-off-by: NSteve French <sfrench@us.ibm.com>
-
- 19 7月, 2007 1 次提交
-
-
由 Steve French 提交于
Previously the only way to do this was to umount all mounts to that server, turn off a proc setting (/proc/fs/cifs/LinuxExtensionsEnabled). Fixes Samba bugzilla bug number: 4582 (and also 2008) Signed-off-by: NSteve French <sfrench@us.ibm.com>
-