SUNRPC: Add rpcauth_list_flavors()
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:Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
Showing
- fs/nfs/nfs4proc.c 7 additions, 4 deletionsfs/nfs/nfs4proc.c
- include/linux/sunrpc/auth.h 2 additions, 0 deletionsinclude/linux/sunrpc/auth.h
- include/linux/sunrpc/gss_api.h 2 additions, 1 deletioninclude/linux/sunrpc/gss_api.h
- net/sunrpc/auth.c 54 additions, 0 deletionsnet/sunrpc/auth.c
- net/sunrpc/auth_gss/auth_gss.c 1 addition, 0 deletionsnet/sunrpc/auth_gss/auth_gss.c
- net/sunrpc/auth_gss/gss_mech_switch.c 14 additions, 4 deletionsnet/sunrpc/auth_gss/gss_mech_switch.c
Loading
Please register or sign in to comment