summaryrefslogtreecommitdiff
path: root/fs/cifs/cifssmb.c
Commit message (Collapse)AuthorAge
* [CIFS] list entry can not return nullSteve French2008-08-08
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* Rename CIFSSMBSetFileTimes to CIFSSMBSetFileInfo and add PID argJeff Layton2008-08-06
| | | | | | | | | | The new name is more clear since this is also used to set file attributes. We'll need the pid_of_opener arg so that we can pass in filehandles of other pids and spare ourselves an open call. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* change CIFSSMBSetTimes to CIFSSMBSetPathInfoJeff Layton2008-08-06
| | | | | | | | | CIFSSMBSetTimes is a deceptive name. This function does more that just set file times. Change it to CIFSSMBSetPathInfo, which is closer to its real purpose. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix trailing whitespaceSteve French2008-08-06
| | | | | | Jeff left trailing whitespace in previous patch Signed-off-by: Steve French <sfrench@us.ibm.com>
* bundle up Unix SET_PATH_INFO args into a struct and change nameJeff Layton2008-08-06
| | | | | | | | | | | We'd like to be able to use the unix SET_PATH_INFO_BASIC args to set file times as well, but that makes the argument list rather long. Bundle up the args for unix SET_PATH_INFO call into a struct. For now, we don't actually use the times fields anywhere. That will be done in a follow-on patch. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix warnings from checkpatchShirish Pargaonkar2008-07-24
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* cifs: assorted endian annotationsHarvey Harrison2008-07-24
| | | | | | | | | | | | | | | | | fs/cifs/cifssmb.c:3917:13: warning: incorrect type in assignment (different base types) fs/cifs/cifssmb.c:3917:13: expected bool [unsigned] [usertype] is_unicode fs/cifs/cifssmb.c:3917:13: got restricted __le16 The comment explains why __force is used here. fs/cifs/connect.c:458:16: warning: cast to restricted __be32 fs/cifs/connect.c:458:16: warning: cast to restricted __be32 fs/cifs/connect.c:458:16: warning: cast to restricted __be32 fs/cifs/connect.c:458:16: warning: cast to restricted __be32 fs/cifs/connect.c:458:16: warning: cast to restricted __be32 fs/cifs/connect.c:458:16: warning: cast to restricted __be32 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds2008-06-11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] cifs: fix oops on mount when CONFIG_CIFS_DFS_UPCALL is enabled [CIFS] Fix hang in mount when negprot causes server to kill tcp session disable most mode changes on non-unix/non-cifsacl mounts [CIFS] Correct incorrect obscure open flag [CIFS] warn if both dynperm and cifsacl mount options specified silently ignore ownership changes unless unix extensions are enabled or we're faking uid changes [CIFS] remove trailing whitespace when creating new inodes, use file_mode/dir_mode exclusively on mount without unix extensions on non-posix shares, clear write bits in mode when ATTR_READONLY is set [CIFS] remove unused variables
| * [CIFS] remove unused variablesSteve French2008-05-23
| | | | | | | | | | CC: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* | cifs endianness fixesAl Viro2008-06-04
|/ | | | | | | | __le16 fields used as host-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Steve French <smfrench@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [CIFS] Remove redundant NULL checkSteve French2008-05-22
| | | | | | Noticed by Coverity checker. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add missing defines for DFSSteve French2008-05-16
| | | | | | | Also has minor cleanup of previous patch CC: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* CIFSGetDFSRefer cleanup + dfs_referral_level_3 fixed to conform REFERRAL_V3 ↵Igor Mammedov2008-05-16
| | | | | | | the MS-DFSC spec. Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Finishup DFS codeSteve French2008-05-15
| | | | | | | Fixup GetDFSRefer to prepare for cleanup of SMB response processing Fix build warning in link.c Signed-off-by: Steve French <sfrench@us.ibm.com>
* add function to convert access flags to legacy open modeJeff Layton2008-05-14
| | | | | | | | SMBLegacyOpen always opens a file as r/w. This could be problematic for files with ATTR_READONLY set. Have it interpret the access_mode into a sane open mode. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] cleanup old checkpatch warningsSteve French2008-05-13
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFSSMBPosixLock should return -EINVAL on errorMarcin Slusarz2008-05-13
| | | | | | | all other codepaths in this function return negative values on errors Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* fix memory leak in CIFSFindNextJeff Layton2008-05-13
| | | | | | | | | | | | | | | | | | | | | When CIFSFindNext gets back an -EBADF from a call, it sets the return code of the function to 0 and eventually exits. Doing this makes the cleanup at the end of the function skip freeing the SMB buffer, so we need to make sure we free the buffer explicitly when doing this. If we don't you end up with errors like this when unplugging the cifs kernel module: slab error in kmem_cache_destroy(): cache `cifs_request': Can't free all objects [<c046bdbf>] kmem_cache_destroy+0x61/0xf3 [<e0f03045>] cifs_destroy_request_bufs+0x14/0x28 [cifs] [<e0f2016e>] exit_cifs+0x1e/0x80 [cifs] [<c043aeae>] sys_delete_module+0x192/0x1b8 [<c04451fd>] audit_syscall_entry+0x14b/0x17d [<c0405413>] syscall_call+0x7/0xb ======================= Signed-off-by: Jeff Layton <jlayton@redhat.com>
* [CIFS] when not using unix extensions, check for and set ATTR_READONLY on ↵Jeff Layton2008-05-11
| | | | | | | | | | | | | | | | | | | | create and mkdir When creating a directory on a CIFS share without POSIX extensions, and the given mode has no write bits set, set the ATTR_READONLY bit. When creating a file, set ATTR_READONLY if the create mode has no write bits set and we're not using unix extensions. There are some comments about this being problematic due to the VFS splitting creates into 2 parts. I'm not sure what that's actually talking about, but I'm assuming that it has something to do with how mknod is implemented. In the simple case where we have no unix extensions and we're just creating a regular file, there's no reason we can't set ATTR_READONLY. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] convert usage of implicit booleans to boolSteve French2008-04-29
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail ↵Steve French2008-04-09
| | | | | | | on reconnect Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] clean up some hard to read ifdefsSteve French2008-02-12
| | | | | | | | 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: Steve French <sfrench@us.ibm.com>
* [CIFS] reduce checkpatch warningsSteve French2008-02-07
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Allow setting mode via cifs aclSteve French2007-12-31
| | | | | | | Requires cifsacl mount flag to be on and CIFS_EXPERIMENTAL enabled CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix SetEA failure to some Samba versionsSteve French2007-12-30
| | | | | | | Thanks to Oleg Gvozdev for noticing the problem. CC: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix buffer overflow if server sends corrupt response to smallSteve French2007-11-13
| | | | | | | | | | | | | | | | | | | 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: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] add OIDs for KRB5 and MSKRB5 to ASN1 parsing routinesJeff Layton2007-11-03
| | | | | | | | | | | | | Also, fix the parser to recognize them and set the secType accordingly. Make CIFSSMBNegotiate not error out automatically after parsing the securityBlob. Also thanks to Q (Igor) and Simo for their help on this set of kerberos patches (and Dave Howells for help on the upcall). Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] ACL support part 8Steve French2007-10-26
| | | | | | | | Now GetACL in getinodeinfo path when cifsacl mount option used, and ACL is parsed for SIDs. Missing only one piece now to be able to retrieve the mode Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] acl support part 6Steve French2007-10-25
| | | | | | Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] remove unused funtion compile warning when experimental offParag Warudkar2007-10-23
| | | | | | | | | get rid of couple of unused function warnings which show up when CONFIG_CIFS_EXPERIMENTAL is not defined - wrap them in #ifdef CONFIG_CIFS_EXPERIMENTAL. Patch against current git. Signed-off-by: Parag Warudkar <kernel-stuff@comcast.net> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] log better errors on failed mountsSteve French2007-10-18
| | | | | | | | Also returns more accurate errors to mount for the cases of account expired and password expired Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Return better error when server requires signing but client forbidsSteve French2007-10-18
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix some endianness problems in new acl codeSteve French2007-10-16
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] parse server_GUID in SPNEGO negProt responseJeff Layton2007-10-16
| | | | | | | | SPNEGO NegProt response also contains a server_GUID. Parse it as we would for RawNTLMSSP. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS]Jeff Layton2007-10-16
| | | | | | | | | | | [CIFS] fix error message about packet signing When packet signing is disabled and the server requires it, cifs prints an error message. The current message refers to a file in /proc that no longer exists. Fix it to refer to the correct file. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix endian conversion problem in posix mkdirCyril Gorcunov2007-10-14
| | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS ACL support part 3Steve French2007-10-12
| | | | | Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix cifsd so shuts down when signing fails during mountSteve French2007-10-04
| | | | | | | | | | | | | | | | | | 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: Jeff Layton <jlayton@redhat.com> CC: Shaggy <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS ACL support (part 2)Shirish Pargaonkar2007-10-03
| | | | | Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix memory leak in statfs to very old serversSteve French2007-09-28
| | | | | | | We were allocating request buffers twice in the statfs path when mounted to very old (Windows 9x) servers. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] move cifs acl code to new file and fix build breakSteve French2007-09-25
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Support for CIFS ACLs (part 1)Steve French2007-09-24
| | | | | | | | Add code to be able to dump CIFS ACL information when Query Posix ACL with cifsacl mount parm enabled. Signed-off-by: Shirish Pargoankar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Print better error when server returns malformed QueryUnixInfo responseSteve French2007-09-20
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] formatting cleanup found by checkpatchSteve French2007-08-30
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS][KJ] use abs() from kernel.h where appropriateAndre Haupt2007-08-30
| | | | | Signed-off-by: Andrew Haupt <andre@finow14.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Allow disabling CIFS Unix Extensions as mount optionSteve French2007-07-18
| | | | | | | | | 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: Steve French <sfrench@us.ibm.com>
* [CIFS] More whitespace/formatting fixes (noticed by checkpatch)Steve French2007-07-17
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add support for new POSIX unlinkSteve French2007-07-15
| | | | | | | | | | In the cleanup phase of the dbench test, we were noticing sharing violation followed by failed directory removals when dbench did not close the test files before the cleanup phase started. Using the new POSIX unlink, which Samba has supported for a few months, avoids this. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] whitespace/formatting fixesSteve French2007-07-13
| | | | | | | | | This should be the last big batch of whitespace/formatting fixes. checkpatch warnings for the cifs directory are down about 90% and many of the remaining ones are harder to remove or make the code harder to read. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] more whitespace cleanupSteve French2007-07-07
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>