Skip to content

Commit

Permalink
NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Apr 19, 2008
1 parent 4410924 commit 78ea323
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2885,7 +2885,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po
RPC_DISPLAY_ADDR),
rpc_peeraddr2str(clp->cl_rpcclient,
RPC_DISPLAY_PROTO),
cred->cr_ops->cr_name,
clp->cl_rpcclient->cl_auth->au_ops->au_name,
clp->cl_id_uniquifier);
setclientid.sc_netid_len = scnprintf(setclientid.sc_netid,
sizeof(setclientid.sc_netid),
Expand Down
2 changes: 0 additions & 2 deletions include/linux/sunrpc/auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ struct rpc_auth {
struct rpc_authops {
struct module *owner;
rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */
#ifdef RPC_DEBUG
char * au_name;
#endif
struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t);
void (*destroy)(struct rpc_auth *);

Expand Down
2 changes: 0 additions & 2 deletions net/sunrpc/auth_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ static struct rpc_cred_cache generic_cred_cache = {

static const struct rpc_authops generic_auth_ops = {
.owner = THIS_MODULE,
#ifdef RPC_DEBUG
.au_name = "Generic",
#endif
.lookup_cred = generic_lookup_cred,
.crcreate = generic_create_cred,
};
Expand Down
2 changes: 0 additions & 2 deletions net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,9 +1287,7 @@ gss_unwrap_resp(struct rpc_task *task,
static const struct rpc_authops authgss_ops = {
.owner = THIS_MODULE,
.au_flavor = RPC_AUTH_GSS,
#ifdef RPC_DEBUG
.au_name = "RPCSEC_GSS",
#endif
.create = gss_create,
.destroy = gss_destroy,
.lookup_cred = gss_lookup_cred,
Expand Down
2 changes: 0 additions & 2 deletions net/sunrpc/auth_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ nul_validate(struct rpc_task *task, __be32 *p)
const struct rpc_authops authnull_ops = {
.owner = THIS_MODULE,
.au_flavor = RPC_AUTH_NULL,
#ifdef RPC_DEBUG
.au_name = "NULL",
#endif
.create = nul_create,
.destroy = nul_destroy,
.lookup_cred = nul_lookup_cred,
Expand Down
2 changes: 0 additions & 2 deletions net/sunrpc/auth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ void __init rpc_init_authunix(void)
const struct rpc_authops authunix_ops = {
.owner = THIS_MODULE,
.au_flavor = RPC_AUTH_UNIX,
#ifdef RPC_DEBUG
.au_name = "UNIX",
#endif
.create = unx_create,
.destroy = unx_destroy,
.lookup_cred = unx_lookup_cred,
Expand Down

0 comments on commit 78ea323

Please sign in to comment.