1. 03 1月, 2014 1 次提交
  2. 13 12月, 2013 1 次提交
    • S
      nfsd: revoking of suid/sgid bits after chown() in a consistent way · c4fa6d7c
      Stanislav Kholmanskikh 提交于
      There is an inconsistency in the handling of SUID/SGID file
      bits after chown() between NFS and other local file systems.
      
      Local file systems (for example, ext3, ext4, xfs, btrfs) revoke
      SUID/SGID bits after chown() on a regular file even if
      the owner/group of the file has not been changed:
      
      ~# touch file; chmod ug+s file; chmod u+x file
      ~# ls -l file
      -rwsr-Sr-- 1 root root 0 Dec  6 04:49 file
      ~# chown root file; ls -l file
      -rwxr-Sr-- 1 root root 0 Dec  6 04:49 file
      
      but NFS doesn't do that:
      
      ~# touch file; chmod ug+s file; chmod u+x file
      ~# ls -l file
      -rwsr-Sr-- 1 root root 0 Dec  6 04:49 file
      ~# chown root file; ls -l file
      -rwsr-Sr-- 1 root root 0 Dec  6 04:49 file
      
      NFS does that only if the owner/group has been changed:
      
      ~# touch file; chmod ug+s file; chmod u+x file
      ~# ls -l file
      -rwsr-Sr-- 1 root root 0 Dec  6 05:02 file
      ~# chown bin file; ls -l file
      -rwxr-Sr-- 1 bin root 0 Dec  6 05:02 file
      
      See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html
      
       "If the specified file is a regular file, one or more of
       the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set,
       and the process has appropriate privileges, it is
       implementation-defined whether the set-user-ID and set-group-ID
       bits are altered."
      
      So both variants are acceptable by POSIX.
      
      This patch makes NFS to behave like local file systems.
      Signed-off-by: NStanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      c4fa6d7c
  3. 12 12月, 2013 1 次提交
  4. 11 12月, 2013 3 次提交
  5. 20 11月, 2013 1 次提交
    • J
      nfsd4: fix xdr decoding of large non-write compounds · 365da4ad
      J. Bruce Fields 提交于
      This fixes a regression from 24750082
      "nfsd4: fix decoding of compounds across page boundaries".  The previous
      code was correct: argp->pagelist is initialized in
      nfs4svc_deocde_compoundargs to rqstp->rq_arg.pages, and is therefore a
      pointer to the page *after* the page we are currently decoding.
      
      The reason that patch nevertheless fixed a problem with decoding
      compounds containing write was a bug in the write decoding introduced by
      5a80a54d "nfsd4: reorganize write
      decoding", after which write decoding no longer adhered to the rule that
      argp->pagelist point to the next page.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      365da4ad
  6. 19 11月, 2013 2 次提交
  7. 15 11月, 2013 1 次提交
  8. 14 11月, 2013 1 次提交
  9. 09 11月, 2013 5 次提交
  10. 05 11月, 2013 1 次提交
  11. 02 11月, 2013 1 次提交
  12. 31 10月, 2013 1 次提交
  13. 30 10月, 2013 6 次提交
  14. 29 10月, 2013 4 次提交
  15. 27 10月, 2013 1 次提交
  16. 25 10月, 2013 1 次提交
  17. 03 10月, 2013 1 次提交
  18. 11 9月, 2013 1 次提交
    • D
      fs: convert fs shrinkers to new scan/count API · 1ab6c499
      Dave Chinner 提交于
      Convert the filesystem shrinkers to use the new API, and standardise some
      of the behaviours of the shrinkers at the same time.  For example,
      nr_to_scan means the number of objects to scan, not the number of objects
      to free.
      
      I refactored the CIFS idmap shrinker a little - it really needs to be
      broken up into a shrinker per tree and keep an item count with the tree
      root so that we don't need to walk the tree every time the shrinker needs
      to count the number of objects in the tree (i.e.  all the time under
      memory pressure).
      
      [glommer@openvz.org: fixes for ext4, ubifs, nfs, cifs and glock. Fixes are needed mainly due to new code merged in the tree]
      [assorted fixes folded in]
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NGlauber Costa <glommer@openvz.org>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Acked-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Acked-by: NJan Kara <jack@suse.cz>
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: Arve Hjønnevåg <arve@android.com>
      Cc: Carlos Maiolino <cmaiolino@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: J. Bruce Fields <bfields@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1ab6c499
  19. 04 9月, 2013 1 次提交
  20. 31 8月, 2013 3 次提交
  21. 08 8月, 2013 2 次提交
  22. 27 7月, 2013 1 次提交