Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()

With the recent change to generic creds, we can no longer use
cred->cr_ops->cr_name to distinguish between RPCSEC_GSS principals and
AUTH_SYS/AUTH_NULL identities. Replace it with the rpc_authops->au_name
instead...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

+1 -11
+1 -1
fs/nfs/nfs4proc.c
··· 2885 2885 RPC_DISPLAY_ADDR), 2886 2886 rpc_peeraddr2str(clp->cl_rpcclient, 2887 2887 RPC_DISPLAY_PROTO), 2888 - cred->cr_ops->cr_name, 2888 + clp->cl_rpcclient->cl_auth->au_ops->au_name, 2889 2889 clp->cl_id_uniquifier); 2890 2890 setclientid.sc_netid_len = scnprintf(setclientid.sc_netid, 2891 2891 sizeof(setclientid.sc_netid),
-2
include/linux/sunrpc/auth.h
··· 96 96 struct rpc_authops { 97 97 struct module *owner; 98 98 rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ 99 - #ifdef RPC_DEBUG 100 99 char * au_name; 101 - #endif 102 100 struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t); 103 101 void (*destroy)(struct rpc_auth *); 104 102
-2
net/sunrpc/auth_generic.c
··· 136 136 137 137 static const struct rpc_authops generic_auth_ops = { 138 138 .owner = THIS_MODULE, 139 - #ifdef RPC_DEBUG 140 139 .au_name = "Generic", 141 - #endif 142 140 .lookup_cred = generic_lookup_cred, 143 141 .crcreate = generic_create_cred, 144 142 };
-2
net/sunrpc/auth_gss/auth_gss.c
··· 1287 1287 static const struct rpc_authops authgss_ops = { 1288 1288 .owner = THIS_MODULE, 1289 1289 .au_flavor = RPC_AUTH_GSS, 1290 - #ifdef RPC_DEBUG 1291 1290 .au_name = "RPCSEC_GSS", 1292 - #endif 1293 1291 .create = gss_create, 1294 1292 .destroy = gss_destroy, 1295 1293 .lookup_cred = gss_lookup_cred,
-2
net/sunrpc/auth_null.c
··· 104 104 const struct rpc_authops authnull_ops = { 105 105 .owner = THIS_MODULE, 106 106 .au_flavor = RPC_AUTH_NULL, 107 - #ifdef RPC_DEBUG 108 107 .au_name = "NULL", 109 - #endif 110 108 .create = nul_create, 111 109 .destroy = nul_destroy, 112 110 .lookup_cred = nul_lookup_cred,
-2
net/sunrpc/auth_unix.c
··· 210 210 const struct rpc_authops authunix_ops = { 211 211 .owner = THIS_MODULE, 212 212 .au_flavor = RPC_AUTH_UNIX, 213 - #ifdef RPC_DEBUG 214 213 .au_name = "UNIX", 215 - #endif 216 214 .create = unx_create, 217 215 .destroy = unx_destroy, 218 216 .lookup_cred = unx_lookup_cred,