diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-07 20:49:28 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-19 16:54:53 -0400 |
commit | 78ea323be6380a9313e87fe241809e912e8ae401 (patch) | |
tree | 6ea9a772ab677012c52a08c6b32e366d7bf129d4 | |
parent | 441092415770ddec648800701895913c4bfd60c1 (diff) |
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>
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/auth.h | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_generic.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_null.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_unix.c | 2 |
6 files changed, 1 insertions, 11 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a1069325b876..dbc09271af02 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2885,7 +2885,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po | |||
2885 | RPC_DISPLAY_ADDR), | 2885 | RPC_DISPLAY_ADDR), |
2886 | rpc_peeraddr2str(clp->cl_rpcclient, | 2886 | rpc_peeraddr2str(clp->cl_rpcclient, |
2887 | RPC_DISPLAY_PROTO), | 2887 | RPC_DISPLAY_PROTO), |
2888 | cred->cr_ops->cr_name, | 2888 | clp->cl_rpcclient->cl_auth->au_ops->au_name, |
2889 | clp->cl_id_uniquifier); | 2889 | clp->cl_id_uniquifier); |
2890 | setclientid.sc_netid_len = scnprintf(setclientid.sc_netid, | 2890 | setclientid.sc_netid_len = scnprintf(setclientid.sc_netid, |
2891 | sizeof(setclientid.sc_netid), | 2891 | sizeof(setclientid.sc_netid), |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index e93cd8aa3eb6..a19c3af933ca 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -96,9 +96,7 @@ struct rpc_auth { | |||
96 | struct rpc_authops { | 96 | struct rpc_authops { |
97 | struct module *owner; | 97 | struct module *owner; |
98 | rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ | 98 | rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ |
99 | #ifdef RPC_DEBUG | ||
100 | char * au_name; | 99 | char * au_name; |
101 | #endif | ||
102 | struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t); | 100 | struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t); |
103 | void (*destroy)(struct rpc_auth *); | 101 | void (*destroy)(struct rpc_auth *); |
104 | 102 | ||
diff --git a/net/sunrpc/auth_generic.c b/net/sunrpc/auth_generic.c index 6a3f77c9e4d3..b6f124c85072 100644 --- a/net/sunrpc/auth_generic.c +++ b/net/sunrpc/auth_generic.c | |||
@@ -136,9 +136,7 @@ static struct rpc_cred_cache generic_cred_cache = { | |||
136 | 136 | ||
137 | static const struct rpc_authops generic_auth_ops = { | 137 | static const struct rpc_authops generic_auth_ops = { |
138 | .owner = THIS_MODULE, | 138 | .owner = THIS_MODULE, |
139 | #ifdef RPC_DEBUG | ||
140 | .au_name = "Generic", | 139 | .au_name = "Generic", |
141 | #endif | ||
142 | .lookup_cred = generic_lookup_cred, | 140 | .lookup_cred = generic_lookup_cred, |
143 | .crcreate = generic_create_cred, | 141 | .crcreate = generic_create_cred, |
144 | }; | 142 | }; |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 55948cd5ea55..7567eb95823b 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -1287,9 +1287,7 @@ out: | |||
1287 | static const struct rpc_authops authgss_ops = { | 1287 | static const struct rpc_authops authgss_ops = { |
1288 | .owner = THIS_MODULE, | 1288 | .owner = THIS_MODULE, |
1289 | .au_flavor = RPC_AUTH_GSS, | 1289 | .au_flavor = RPC_AUTH_GSS, |
1290 | #ifdef RPC_DEBUG | ||
1291 | .au_name = "RPCSEC_GSS", | 1290 | .au_name = "RPCSEC_GSS", |
1292 | #endif | ||
1293 | .create = gss_create, | 1291 | .create = gss_create, |
1294 | .destroy = gss_destroy, | 1292 | .destroy = gss_destroy, |
1295 | .lookup_cred = gss_lookup_cred, | 1293 | .lookup_cred = gss_lookup_cred, |
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index 3c26c18df0de..c70dd7f5258e 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c | |||
@@ -104,9 +104,7 @@ nul_validate(struct rpc_task *task, __be32 *p) | |||
104 | const struct rpc_authops authnull_ops = { | 104 | const struct rpc_authops authnull_ops = { |
105 | .owner = THIS_MODULE, | 105 | .owner = THIS_MODULE, |
106 | .au_flavor = RPC_AUTH_NULL, | 106 | .au_flavor = RPC_AUTH_NULL, |
107 | #ifdef RPC_DEBUG | ||
108 | .au_name = "NULL", | 107 | .au_name = "NULL", |
109 | #endif | ||
110 | .create = nul_create, | 108 | .create = nul_create, |
111 | .destroy = nul_destroy, | 109 | .destroy = nul_destroy, |
112 | .lookup_cred = nul_lookup_cred, | 110 | .lookup_cred = nul_lookup_cred, |
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index 04e936a56fb2..44920b90bdc4 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
@@ -210,9 +210,7 @@ void __init rpc_init_authunix(void) | |||
210 | const struct rpc_authops authunix_ops = { | 210 | const struct rpc_authops authunix_ops = { |
211 | .owner = THIS_MODULE, | 211 | .owner = THIS_MODULE, |
212 | .au_flavor = RPC_AUTH_UNIX, | 212 | .au_flavor = RPC_AUTH_UNIX, |
213 | #ifdef RPC_DEBUG | ||
214 | .au_name = "UNIX", | 213 | .au_name = "UNIX", |
215 | #endif | ||
216 | .create = unx_create, | 214 | .create = unx_create, |
217 | .destroy = unx_destroy, | 215 | .destroy = unx_destroy, |
218 | .lookup_cred = unx_lookup_cred, | 216 | .lookup_cred = unx_lookup_cred, |