summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsacl.c
Commit message (Collapse)AuthorAgeFilesLines
* [CIFS] Fix warnings from checkpatchShirish Pargaonkar2008-07-241-19/+19
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix improper endian conversion of ACL subauth fieldShirish Pargaonkar2008-07-241-2/+1
| | | | | | | | In mode_to_acl when converting a Unix mode to a Windows ACL the subauth fields of the SID in the ACL were translated incorrectly on bigendian architectures Signed-off-by: Steve French <sfrench@us.ibm.com>
* cifs: fix wksidarr declaration to be big-endian friendlyJeff Layton2008-07-121-5/+5
| | | | | | | | | | | | | | | | | | The current definition of wksidarr works fine on little endian arches (since cpu_to_le32 is a no-op there), but on big-endian arches, it fails to compile with this error: error: braced-group within expression allowed only inside a function The problem is that this static declaration has cpu_to_le32 embedded within it, and that expands into a function macro. We need to use __constant_cpu_to_le32() instead. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Steven French <sfrench@us.ibm.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [CIFS] fix build warningSteve French2008-05-091-1/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] convert usage of implicit booleans to boolSteve French2008-04-291-8/+8
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix acl length when very short ACL being modified by chmodSteve French2008-04-091-6/+8
| | | | | Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* cifs: fix misannotationsAl Viro2008-03-301-2/+2
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [CIFS] file create with acl support enabled is slowSteve French2008-03-141-10/+15
| | | | | | | | | | | | | | | | Shirish Pargaonkar noted: With cifsacl mount option, when a file is created on the Windows server, exclusive oplock is broken right away because the get cifs acl code again opens the file to obtain security descriptor. The client does not have the newly created file handle or inode in any of its lists yet so it does not respond to oplock break and server waits for its duration and then responds to the second open. This slows down file creation signficantly. The fix is to pass the file descriptor to the get cifsacl code wherever available so that get cifs acl code does not send second open (NT Create ANDX) and oplock is not broken. CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] patch to fix incorrect encoding of number of aces on set modeShirish Pargaonkar2008-02-121-5/+1
| | | | | | | | This patch fixes an error in the experimental cifs acl code. During chmod, set security descriptor data (num aces) is not sent with little-endian encoding. 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-121-33/+11
| | | | | | | | 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-071-4/+3
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Allow setting mode via cifs aclSteve French2007-12-311-8/+232
| | | | | | | 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>
* regression: cifs endianness bugAl Viro2007-12-051-16/+17
| | | | | | | | | | | access_flags_to_mode() gets on-the-wire data (little-endian) and treats it as host-endian. Introduced in commit e01b64001359034d04c695388870936ed3d1b56b ("[CIFS] enable get mode from ACL when cifsacl mount option specified") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [CIFS] Fix check after use error in ACL codeSteve French2007-11-251-6/+7
| | | | | | | Spotted by the coverity scanner. CC: Adrian Bunk <bunk@kernel.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] add mode to acl conversion helper functionSteve French2007-11-081-2/+33
| | | | | Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix incorrect mode when ACL had deny access control entriesSteve French2007-11-081-9/+46
| | | | | | | | | | | | | | | | | | | | When mounted with the cifsacl mount option, we were treating any deny ACEs found like allow ACEs and it turns out for SFU and SUA Windows set these type of access control entries often. The order of ACEs is important too. The canonical order that most ACL tools and Windows explorer consruct ACLs with is to begin with DENY entries then follow with ALLOW, otherwise an allow entry could be encountered first, making the subsequent deny entry like "dead code which would be superflous since Windows stops when a match is made for the operation you are trying to perform for your user We start with no permissions in the mode and build up as we find permissions (ie allow ACEs). This fixes deny ACEs so they affect the mask used to set the subsequent allow ACEs. Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> CC: Alexander Bokovoy <ab@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix walking out end of cifs daclSteve French2007-11-051-2/+2
| | | | | Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] If no Access Control Entries, set mode perm bits to zeroSteve French2007-11-011-22/+55
| | | | | | | Also clean up ACL code Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Don't request too much permission when reading an ACLSteve French2007-10-311-7/+25
| | | | | | | | | We were requesting GENERIC_READ but that fails when we do not have read permission on the file (even if we could read the ACL). Also move the dump access control entry code into debug ifdef. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] enable get mode from ACL when cifsacl mount option specifiedShirish Pargaonkar2007-10-301-7/+21
| | | | | | | | Part 9 of ACL patch series. getting mode from ACL now works in some cases (and requires CIFS_EXPERIMENTAL config option). Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] ACL support part 8Steve French2007-10-261-63/+70
| | | | | | | | 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 7Steve French2007-10-261-3/+18
| | | | | | Also fixes typo, build break Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] acl support part 6Steve French2007-10-251-20/+71
| | | | | | Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] acl support part 6Steve French2007-10-231-55/+24
| | | | | CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] ACL support part 5Steve French2007-10-191-0/+23
| | | | | Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix typoSteve French2007-10-171-1/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] acl support part 4Steve French2007-10-171-9/+10
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] build breakSteve French2007-10-171-1/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] endian fixesSteve French2007-10-171-3/+3
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] endian fixes in new acl codeDave Kleikamp2007-10-161-11/+11
| | | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix some endianness problems in new acl codeSteve French2007-10-161-14/+14
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] remove compile warnings when debug disabledSteve French2007-10-121-2/+2
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS ACL support part 3Steve French2007-10-121-10/+110
| | | | | Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Cleanup formattingSteve French2007-10-031-39/+39
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS ACL support (part 2)Shirish Pargaonkar2007-10-031-56/+147
| | | | | Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] change misleading field nameSteve French2007-10-011-2/+2
| | | | | | num_auth is really num_subauth in ACL terminology Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix cut and paste error - missing defines cause cifsacl build errorSteve French2007-09-251-1/+8
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] move cifs acl code to new file and fix build breakSteve French2007-09-251-0/+134
Signed-off-by: Steve French <sfrench@us.ibm.com>
OpenPOWER on IntegriCloud