1. 01 9月, 2013 1 次提交
  2. 30 8月, 2013 4 次提交
  3. 02 7月, 2013 2 次提交
  4. 29 6月, 2013 1 次提交
  5. 29 5月, 2013 1 次提交
  6. 16 5月, 2013 3 次提交
  7. 13 5月, 2013 1 次提交
  8. 08 5月, 2013 1 次提交
  9. 06 5月, 2013 1 次提交
  10. 04 5月, 2013 1 次提交
  11. 01 5月, 2013 1 次提交
  12. 30 4月, 2013 4 次提交
  13. 26 4月, 2013 3 次提交
    • S
      SUNRPC: Use gssproxy upcall for server RPCGSS authentication. · 030d794b
      Simo Sorce 提交于
      The main advantge of this new upcall mechanism is that it can handle
      big tickets as seen in Kerberos implementations where tickets carry
      authorization data like the MS-PAC buffer with AD or the Posix Authorization
      Data being discussed in IETF on the krbwg working group.
      
      The Gssproxy program is used to perform the accept_sec_context call on the
      kernel's behalf. The code is changed to also pass the input buffer straight
      to upcall mechanism to avoid allocating and copying many pages as tokens can
      be as big (potentially more in future) as 64KiB.
      Signed-off-by: NSimo Sorce <simo@redhat.com>
      [bfields: containerization, negotiation api]
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      030d794b
    • S
      SUNRPC: Add RPC based upcall mechanism for RPCGSS auth · 1d658336
      Simo Sorce 提交于
      This patch implements a sunrpc client to use the services of the gssproxy
      userspace daemon.
      
      In particular it allows to perform calls in user space using an RPC
      call instead of custom hand-coded upcall/downcall messages.
      
      Currently only accept_sec_context is implemented as that is all is needed for
      the server case.
      
      File server modules like NFS and CIFS can use full gssapi services this way,
      once init_sec_context is also implemented.
      
      For the NFS server case this code allow to lift the limit of max 2k krb5
      tickets. This limit is prevents legitimate kerberos deployments from using krb5
      authentication with the Linux NFS server as they have normally ticket that are
      many kilobytes large.
      
      It will also allow to lift the limitation on the size of the credential set
      (uid,gid,gids) passed down from user space for users that have very many groups
      associated. Currently the downcall mechanism used by rpc.svcgssd is limited
      to around 2k secondary groups of the 65k allowed by kernel structures.
      Signed-off-by: NSimo Sorce <simo@redhat.com>
      [bfields: containerization, concurrent upcalls, misc. fixes and cleanup]
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      1d658336
    • S
      SUNRPC: conditionally return endtime from import_sec_context · 400f26b5
      Simo Sorce 提交于
      We expose this parameter for a future caller.
      It will be used to extract the endtime from the gss-proxy upcall mechanism,
      in order to set the rsc cache expiration time.
      Signed-off-by: NSimo Sorce <simo@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      400f26b5
  14. 30 3月, 2013 8 次提交
    • C
      SUNRPC: Remove EXPORT_SYMBOL_GPL() from GSS mech switch · 5007220b
      Chuck Lever 提交于
      Clean up: Reduce the symbol table footprint for auth_rpcgss.ko by
      removing exported symbols for functions that are no longer used
      outside of auth_rpcgss.ko.
      
      The remaining two EXPORTs in gss_mech_switch.c get documenting
      comments.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5007220b
    • C
      SUNRPC: Make gss_mech_get() static · 6599c0ac
      Chuck Lever 提交于
      gss_mech_get() is no longer used outside of gss_mech_switch.c.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6599c0ac
    • C
      SUNRPC: Refactor nfsd4_do_encode_secinfo() · a77c806f
      Chuck Lever 提交于
      Clean up.  This matches a similar API for the client side, and
      keeps ULP fingers out the of the GSS mech switch.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Acked-by: NJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a77c806f
    • C
      SUNRPC: Consider qop when looking up pseudoflavors · 83523d08
      Chuck Lever 提交于
      The NFSv4 SECINFO operation returns a list of security flavors that
      the server supports for a particular share.  An NFSv4 client is
      supposed to pick a pseudoflavor it supports that corresponds to one
      of the flavors returned by the server.
      
      GSS flavors in this list have a GSS tuple that identify a specific
      GSS pseudoflavor.
      
      Currently our client ignores the GSS tuple's "qop" value.  A
      matching pseudoflavor is chosen based only on the OID and service
      value.
      
      So far this omission has not had much effect on Linux.  The NFSv4
      protocol currently supports only one qop value: GSS_C_QOP_DEFAULT,
      also known as zero.
      
      However, if an NFSv4 server happens to return something other than
      zero in the qop field, our client won't notice.  This could cause
      the client to behave in incorrect ways that could have security
      implications.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      83523d08
    • C
      SUNRPC: Load GSS kernel module by OID · f783288f
      Chuck Lever 提交于
      The current GSS mech switch can find and load GSS pseudoflavor
      modules by name ("krb5") or pseudoflavor number ("390003"), but
      cannot find GSS modules by GSS tuple:
      
        [ "1.2.840.113554.1.2.2", GSS_C_QOP_DEFAULT, RPC_GSS_SVC_NONE ]
      
      This is important when dealing with a SECINFO request.  A SECINFO
      reply contains a list of flavors the server supports for the
      requested export, but GSS flavors also have a GSS tuple that maps
      to a pseudoflavor (like 390003 for krb5).
      
      If the GSS module that supports the OID in the tuple is not loaded,
      our client is not able to load that module dynamically to support
      that pseudoflavor.
      
      Add a way for the GSS mech switch to load GSS pseudoflavor support
      by OID before searching for the pseudoflavor that matches the OID
      and service.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f783288f
    • C
      SUNRPC: Introduce rpcauth_get_pseudoflavor() · 9568c5e9
      Chuck Lever 提交于
      A SECINFO reply may contain flavors whose kernel module is not
      yet loaded by the client's kernel.  A new RPC client API, called
      rpcauth_get_pseudoflavor(), is introduced to do proper checking
      for support of a security flavor.
      
      When this API is invoked, the RPC client now tries to load the
      module for each flavor first before performing the "is this
      supported?" check.  This means if a module is available on the
      client, but has not been loaded yet, it will be loaded and
      registered automatically when the SECINFO reply is processed.
      
      The new API can take a full GSS tuple (OID, QoP, and service).
      Previously only the OID and service were considered.
      
      nfs_find_best_sec() is updated to verify all flavors requested in a
      SECINFO reply, including AUTH_NULL and AUTH_UNIX.  Previously these
      two flavors were simply assumed to be supported without consulting
      the RPC client.
      
      Note that the replaced version of nfs_find_best_sec() can return
      RPC_AUTH_MAXFLAVOR if the server returns a recognized OID but an
      unsupported "service" value.  nfs_find_best_sec() now returns
      RPC_AUTH_UNIX in this case.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      9568c5e9
    • C
      SUNRPC: Define rpcsec_gss_info structure · fb15b26f
      Chuck Lever 提交于
      The NFSv4 SECINFO procedure returns a list of security flavors.  Any
      GSS flavor also has a GSS tuple containing an OID, a quality-of-
      protection value, and a service value, which specifies a particular
      GSS pseudoflavor.
      
      For simplicity and efficiency, I'd like to return each GSS tuple
      from the NFSv4 SECINFO XDR decoder and pass it straight into the RPC
      client.
      
      Define a data structure that is visible to both the NFS client and
      the RPC client.  Take structure and field names from the relevant
      standards to avoid confusion.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fb15b26f
    • C
      SUNRPC: Missing module alias for auth_rpcgss.ko · 71afa85e
      Chuck Lever 提交于
      Commit f344f6df "SUNRPC: Auto-load RPC authentication kernel
      modules", Mon Mar 20 13:44:08 2006, adds a request_module() call
      in rpcauth_create() to auto-load RPC security modules when a ULP
      tries to create a credential of that flavor.
      
      In rpcauth_create(), the name of the module to load is built like
      this:
      
      	request_module("rpc-auth-%u", flavor);
      
      This means that for, say, RPC_AUTH_GSS, request_module() is looking
      for a module or alias called "rpc-auth-6".
      
      The GSS module is named "auth_rpcgss", and commit f344f6df does not
      add any new module aliases.  There is also no such alias provided in
      /etc/modprobe.d on my system (Fedora 16).  Without this alias, the
      GSS module is not loaded on demand.
      
      This is used by rpcauth_create().  The pseudoflavor_to_flavor() call
      can return RPC_AUTH_GSS, which is passed to request_module().
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      71afa85e
  15. 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
  16. 23 2月, 2013 1 次提交
  17. 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
  18. 15 2月, 2013 2 次提交
  19. 13 2月, 2013 3 次提交