1. 16 12月, 2009 3 次提交
    • J
      nfsd: make V4ROOT exports read-only · 774b1478
      J. Bruce Fields 提交于
      I can't see any use for writeable V4ROOT exports.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      774b1478
    • J
      nfsd: allow exports of symlinks · f2ca7153
      J. Bruce Fields 提交于
      We want to allow exports of symlinks, to allow mountd to communicate to
      the kernel which symlinks lead to exports, and hence which symlinks need
      to be visible on the pseudofilesystem.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      f2ca7153
    • S
      nfsd: introduce export flag for v4 pseudoroot · eb4c86c6
      Steve Dickson 提交于
      NFSv4 differs from v2 and v3 in that it presents a single unified
      filesystem tree, whereas v2 and v3 exported multiple filesystem (whose
      roots could be found using a separate mount protocol).
      
      Our original NFSv4 server implementation asked the administrator to
      designate a single filesystem as the NFSv4 root, then to mount
      filesystems they wished to export underneath.  (Often using bind mounts
      of already-existing filesystems.)
      
      This was conceptually simple, and allowed easy implementation, but
      created a serious obstacle to upgrading between v2/v3: since the paths
      to v4 filesystems were different, administrators would have to adjust
      all the paths in client-side mount commands when switching to v4.
      
      Various workarounds are possible.  For example, the administrator could
      export "/" and designate it as the v4 root.  However, the security risks
      of that approach are obvious, and in any case we shouldn't be requiring
      the administrator to take extra steps to fix this problem; instead, the
      server should present consistent paths across different versions by
      default.
      
      These patches take a modified version of that approach: we provide a new
      export option which exports only a subset of a filesystem.  With this
      flag, it becomes safe for mountd to export "/" by default, with no need
      for additional configuration.
      
      We begin just by defining the new flag.
      Signed-off-by: NSteve Dickson <steved@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      eb4c86c6
  2. 15 12月, 2009 2 次提交
  3. 29 9月, 2009 1 次提交
    • J
      nfsd4: fix error return when pseudoroot missing · f39bde24
      J. Bruce Fields 提交于
      We really shouldn't hit this case at all, and forthcoming kernel and
      nfs-utils changes should eliminate this case; if it does happen,
      consider it a bug rather than reporting an error that doesn't really
      make sense for the operation (since there's no reason for a server to be
      accepting v4 traffic yet have no root filehandle).
      
      Also move some exp_pseudoroot code into a helper function while we're
      here.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      f39bde24
  4. 23 9月, 2009 1 次提交
  5. 04 9月, 2009 1 次提交
  6. 10 8月, 2009 1 次提交
  7. 12 6月, 2009 4 次提交
  8. 24 4月, 2009 1 次提交
  9. 23 10月, 2008 4 次提交
  10. 31 7月, 2008 1 次提交
    • J
      fs/nfsd/export.c: Adjust error handling code involving auth_domain_put · 53e6d8d1
      Julia Lawall 提交于
      Once clp is assigned, it never becomes NULL, so we can make a label for it
      in the error handling code.  Because the call to path_lookup follows the
      call to auth_domain_find, its error handling code should jump to this new
      label.
      
      The semantic match that finds this problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r@
      expression x,E;
      statement S;
      position p1,p2,p3;
      @@
      
      (
      if ((x = auth_domain_find@p1(...)) == NULL || ...) S
      |
      x = auth_domain_find@p1(...)
      ... when != x
      if (x == NULL || ...) S
      )
      <...
      if@p3 (...) { ... when != auth_domain_put(x)
                        when != if (x) { ... auth_domain_put(x); ...}
          return@p2 ...;
      }
      ...>
      (
      return x;
      |
      return 0;
      |
      x = E
      |
      E = x
      |
      auth_domain_put(x)
      )
      
      @exists@
      position r.p1,r.p2,r.p3;
      expression x;
      int ret != 0;
      statement S;
      @@
      
      * x = auth_domain_find@p1(...)
        <...
      * if@p3 (...)
        S
        ...>
      * return@p2 \(NULL\|ret\);
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      53e6d8d1
  11. 24 4月, 2008 1 次提交
  12. 15 2月, 2008 6 次提交
  13. 08 2月, 2008 1 次提交
  14. 02 2月, 2008 3 次提交
    • J
      knfsd: don't bother mapping putrootfh enoent to eperm · f7b8066f
      J. Bruce Fields 提交于
      Neither EPERM and ENOENT map to valid errors for PUTROOTFH according to
      rfc 3530, and, if anything, ENOENT is likely to be slightly more
      informative; so don't bother mapping ENOENT to EPERM.  (Probably this
      was originally done because one likely cause was that there is an fsid=0
      export but that it isn't permitted to this particular client.  Now that
      we allow WRONGSEC returns, this is somewhat less likely.)
      
      In the long term we should work to make this situation less likely,
      perhaps by turning off nfsv4 service entirely in the absence of the
      pseudofs root, or constructing a pseudofilesystem root ourselves in the
      kernel as necessary.
      
      Thanks to Benny Halevy <bhalevy@panasas.com> for pointing out this
      problem.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Benny Halevy <bhalevy@panasas.com>
      f7b8066f
    • J
      knfsd: allow cache_register to return error on failure · dbf847ec
      J. Bruce Fields 提交于
      Newer server features such as nfsv4 and gss depend on proc to work, so a
      failure to initialize the proc files they need should be treated as
      fatal.
      
      Thanks to Andrew Morton for style fix and compile fix in case where
      CONFIG_NFSD_V4 is undefined.
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      dbf847ec
    • J
      knfsd: cache unregistration needn't return error · df95a9d4
      J. Bruce Fields 提交于
      There's really nothing much the caller can do if cache unregistration
      fails.  And indeed, all any caller does in this case is print an error
      and continue.  So just return void and move the printk's inside
      cache_unregister.
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      df95a9d4
  15. 22 10月, 2007 1 次提交
    • C
      exportfs: remove old methods · cfaea787
      Christoph Hellwig 提交于
      Now that all filesystems are converted remove support for the old methods.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Chris Mason <mason@suse.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: "Vladimir V. Saveliev" <vs@namesys.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cfaea787
  16. 17 10月, 2007 1 次提交
  17. 01 8月, 2007 1 次提交
  18. 22 7月, 2007 1 次提交
  19. 20 7月, 2007 1 次提交
  20. 18 7月, 2007 5 次提交