1. 06 3月, 2013 1 次提交
    • J
      nfsd: fix krb5 handling of anonymous principals · 3c34ae11
      J. Bruce Fields 提交于
      krb5 mounts started failing as of
      683428fa "sunrpc: Update svcgss xdr
      handle to rpsec_contect cache".
      
      The problem is that mounts are usually done with some host principal
      which isn't normally mapped to any user, in which case svcgssd passes
      down uid -1, which the kernel is then expected to map to the
      export-specific anonymous uid or gid.
      
      The new uid_valid/gid_valid checks were therefore causing that downcall
      to fail.
      
      (Note the regression may not have been seen with older userspace that
      tended to map unknown principals to an anonymous id on their own rather
      than leaving it to the kernel.)
      Reviewed-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      3c34ae11
  2. 23 2月, 2013 1 次提交
  3. 18 2月, 2013 1 次提交
    • J
      sunrpc: silence build warning in gss_fill_context · 173db309
      Jeff Layton 提交于
      Since commit 620038f6, gcc is throwing the following warning:
      
        CC [M]  net/sunrpc/auth_gss/auth_gss.o
      In file included from include/linux/sunrpc/types.h:14:0,
                       from include/linux/sunrpc/sched.h:14,
                       from include/linux/sunrpc/clnt.h:18,
                       from net/sunrpc/auth_gss/auth_gss.c:45:
      net/sunrpc/auth_gss/auth_gss.c: In function ‘gss_pipe_downcall’:
      include/linux/sunrpc/debug.h:45:10: warning: ‘timeout’ may be used
      uninitialized in this function [-Wmaybe-uninitialized]
          printk(KERN_DEFAULT args); \
                ^
      net/sunrpc/auth_gss/auth_gss.c:194:15: note: ‘timeout’ was declared here
        unsigned int timeout;
                     ^
      If simple_get_bytes returns an error, then we'll end up calling printk
      with an uninitialized timeout value. Reasonably harmless, but fairly
      simple to fix by removing the printout of the uninitialised parameters.
      
      Cc: Andy Adamson <andros@netapp.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      [Trond: just remove the parameters rather than initialising timeout]
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      173db309
  4. 15 2月, 2013 2 次提交
  5. 13 2月, 2013 5 次提交
  6. 09 2月, 2013 1 次提交
    • J
      sunrpc: trim off trailing checksum before returning decrypted or integrity authenticated buffer · 4c190e2f
      Jeff Layton 提交于
      When GSSAPI integrity signatures are in use, or when we're using GSSAPI
      privacy with the v2 token format, there is a trailing checksum on the
      xdr_buf that is returned.
      
      It's checked during the authentication stage, and afterward nothing
      cares about it. Ordinarily, it's not a problem since the XDR code
      generally ignores it, but it will be when we try to compute a checksum
      over the buffer to help prevent XID collisions in the duplicate reply
      cache.
      
      Fix the code to trim off the checksums after verifying them. Note that
      in unwrap_integ_data, we must avoid trying to reverify the checksum if
      the request was deferred since it will no longer be present when it's
      revisited.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      4c190e2f
  7. 01 2月, 2013 2 次提交
  8. 13 12月, 2012 1 次提交
  9. 02 10月, 2012 1 次提交
  10. 18 7月, 2012 1 次提交
  11. 17 7月, 2012 1 次提交
    • C
      SUNRPC: Add rpcauth_list_flavors() · 6a1a1e34
      Chuck Lever 提交于
      The gss_mech_list_pseudoflavors() function provides a list of
      currently registered GSS pseudoflavors.  This list does not include
      any non-GSS flavors that have been registered with the RPC client.
      nfs4_find_root_sec() currently adds these extra flavors by hand.
      
      Instead, nfs4_find_root_sec() should be looking at the set of flavors
      that have been explicitly registered via rpcauth_register().  And,
      other areas of code will soon need the same kind of list that
      contains all flavors the kernel currently knows about (see below).
      
      Rather than cloning the open-coded logic in nfs4_find_root_sec() to
      those new places, introduce a generic RPC function that generates a
      full list of registered auth flavors and pseudoflavors.
      
      A new rpc_authops method is added that lists a flavor's
      pseudoflavors, if it has any.  I encountered an interesting module
      loader loop when I tried to get the RPC client to invoke
      gss_mech_list_pseudoflavors() by name.
      
      This patch is a pre-requisite for server trunking discovery, and a
      pre-requisite for fixing up the in-kernel mount client to do better
      automatic security flavor selection.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6a1a1e34
  12. 01 6月, 2012 3 次提交
  13. 04 5月, 2012 1 次提交
  14. 03 5月, 2012 1 次提交
  15. 26 4月, 2012 1 次提交
  16. 16 4月, 2012 1 次提交
  17. 20 3月, 2012 1 次提交
  18. 13 3月, 2012 1 次提交
  19. 12 3月, 2012 1 次提交
    • T
      SUNRPC: Fix a few sparse warnings · 09acfea5
      Trond Myklebust 提交于
      net/sunrpc/svcsock.c:412:22: warning: incorrect type in assignment
      (different address spaces)
       - svc_partial_recvfrom now takes a struct kvec, so the variable
         save_iovbase needs to be an ordinary (void *)
      
      Make a bunch of variables in net/sunrpc/xprtsock.c static
      
      Fix a couple of "warning: symbol 'foo' was not declared. Should it be
      static?" reports.
      
      Fix a couple of conflicting function declarations.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      09acfea5
  20. 03 3月, 2012 1 次提交
  21. 01 2月, 2012 9 次提交
  22. 13 1月, 2012 1 次提交
  23. 05 1月, 2012 1 次提交
  24. 19 10月, 2011 1 次提交