1. 14 Dec, 2009 5 commits
    • Boaz Harrosh's avatar
      nfsd: Headers Independence and include cleanups · 72579ac9
      Boaz Harrosh authored
      * Add includes that are directly used by headers
      * Remove includes that are not needed
      
      These are the changes made:
      
      [xdr.h]
      struct nfsd_readdirres has an embedded struct readdir_cd from nfsd.h
      fixing that we can drop other includes
      
      [xdr4.h]
      embedded types defined both at state.h and nfsd.h
      
      [syscall.h]
      After export.h fix none of these stuff is needed.
      fix extra space in # include <> statement
      
      [stats.h]
      does not need <linux/nfs4.h> but was export to user-mode
      so I don't touch it
      
      [state.h]
      embedded types from nfsfh.h like struct knfsd_fh. bringing that
      eliminates the need for all other includes
      
      [nfsfh.h]
      directly manipulating types from sunrpc/svc.h.
      Removed Other unused headers.
      
      [nfsd.h]
      removed unused headers include
      
      [export.h]
      lots of sunrpc/svc.h types and a single prototype declaration
      with pointer from nfsfh.h, but all users of export.h do need
      nfsfh.h any way. remove now un-needed include.
      
      [const.h]
      Unfixed (not independent)
      
      [cache.h]
      could do with a forward declaration of "struct svc_rqst;"
      from sunrpc/svc.h but all users absolutely will need
      sunrpc/svc.h it is easier overall this way.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      72579ac9
    • Boaz Harrosh's avatar
      nfsd: Fix independence of a few nfsd related headers · d7031582
      Boaz Harrosh authored
      An header should be compilation independent, .i.e pull in
      any header who's declarations are directly used by this header.
      And not let users re-include all it's dependencies all over
      again.
      
      [At the end of the day what's the use of a header if it does
       not have more then one user?]
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      d7031582
    • Boaz Harrosh's avatar
      sunrpc: Clean never used include files · a600ffcb
      Boaz Harrosh authored
      Remove include of two headers never used by this file.
      Doing so exposed a missing #include <linux/types.h> in
      include/linux/sunrpc/rpc_rdma.h.
      
      I did not see any other users dependency but if exist they
      should be fixed since these headers are totally irrelevant
      to here.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      a600ffcb
    • Boaz Harrosh's avatar
      nfsd: Remove unused dprintk · 4056c9a3
      Boaz Harrosh authored
      This doesn't appear to be useful.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      4056c9a3
    • J. Bruce Fields's avatar
      nfsd4: fix share mode permissions · 57ecb34f
      J. Bruce Fields authored
      NFSv4 opens may function as locks denying other NFSv4 users the rights
      to open a file.
      
      We're requiring a user to have write permissions before they can deny
      write.  We're *not* requiring a user to have write permissions to deny
      read, which is if anything a more drastic denial.
      
      What was intended was to require write permissions for DENY_READ.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      57ecb34f
  2. 25 Nov, 2009 1 commit
    • J. Bruce Fields's avatar
      nfsd: simplify fh_verify access checks · 864f0f61
      J. Bruce Fields authored
      All nfsd security depends on the security checks in fh_verify, and
      especially on nfsd_setuser().
      
      It therefore bothers me that the nfsd_setuser call may be made from
      three different places, depending on whether the filehandle has already
      been mapped to a dentry, and on whether subtreechecking is in force.
      
      Instead, make an unconditional call in fh_verify(), so it's trivial to
      verify that the call always occurs.
      
      That leaves us with a redundant nfsd_setuser() call in the subtreecheck
      case--it needs the correct user set earlier in order to check execute
      permissions on the path to this filehandle--but I'm willing to accept
      that minor inefficiency in the subtreecheck case in return for more
      straightforward permission checking.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      864f0f61
  3. 23 Nov, 2009 2 commits
  4. 19 Nov, 2009 9 commits
  5. 18 Nov, 2009 23 commits