diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-23 20:17:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:34 -0400 |
commit | f1c0a8615090359d57e096157feb9f900cbb233c (patch) | |
tree | 2d76448a7c83a45944161a3d966a42f922c543dd /net/sunrpc | |
parent | de7a8ce38aea529876db3890b61947bc4bc004da (diff) |
SUNRPC: Mark auth and cred operation tables as constant.
Also do the same for gss_api operation tables.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth.c | 8 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 8 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_mech.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_spkm3_mech.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_null.c | 4 | ||||
-rw-r--r-- | net/sunrpc/auth_unix.c | 6 |
6 files changed, 15 insertions, 15 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 1686dc74c6a9..d3f0f944c0b5 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | static DEFINE_SPINLOCK(rpc_authflavor_lock); | 21 | static DEFINE_SPINLOCK(rpc_authflavor_lock); |
22 | static struct rpc_authops * auth_flavors[RPC_AUTH_MAXFLAVOR] = { | 22 | static const struct rpc_authops *auth_flavors[RPC_AUTH_MAXFLAVOR] = { |
23 | &authnull_ops, /* AUTH_NULL */ | 23 | &authnull_ops, /* AUTH_NULL */ |
24 | &authunix_ops, /* AUTH_UNIX */ | 24 | &authunix_ops, /* AUTH_UNIX */ |
25 | NULL, /* others can be loadable modules */ | 25 | NULL, /* others can be loadable modules */ |
@@ -33,7 +33,7 @@ pseudoflavor_to_flavor(u32 flavor) { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | int | 35 | int |
36 | rpcauth_register(struct rpc_authops *ops) | 36 | rpcauth_register(const struct rpc_authops *ops) |
37 | { | 37 | { |
38 | rpc_authflavor_t flavor; | 38 | rpc_authflavor_t flavor; |
39 | int ret = -EPERM; | 39 | int ret = -EPERM; |
@@ -50,7 +50,7 @@ rpcauth_register(struct rpc_authops *ops) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | int | 52 | int |
53 | rpcauth_unregister(struct rpc_authops *ops) | 53 | rpcauth_unregister(const struct rpc_authops *ops) |
54 | { | 54 | { |
55 | rpc_authflavor_t flavor; | 55 | rpc_authflavor_t flavor; |
56 | int ret = -EPERM; | 56 | int ret = -EPERM; |
@@ -70,7 +70,7 @@ struct rpc_auth * | |||
70 | rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt) | 70 | rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt) |
71 | { | 71 | { |
72 | struct rpc_auth *auth; | 72 | struct rpc_auth *auth; |
73 | struct rpc_authops *ops; | 73 | const struct rpc_authops *ops; |
74 | u32 flavor = pseudoflavor_to_flavor(pseudoflavor); | 74 | u32 flavor = pseudoflavor_to_flavor(pseudoflavor); |
75 | 75 | ||
76 | auth = ERR_PTR(-EINVAL); | 76 | auth = ERR_PTR(-EINVAL); |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 459dc9b1d1ad..177a9e413c0a 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -54,9 +54,9 @@ | |||
54 | #include <linux/sunrpc/gss_api.h> | 54 | #include <linux/sunrpc/gss_api.h> |
55 | #include <asm/uaccess.h> | 55 | #include <asm/uaccess.h> |
56 | 56 | ||
57 | static struct rpc_authops authgss_ops; | 57 | static const struct rpc_authops authgss_ops; |
58 | 58 | ||
59 | static struct rpc_credops gss_credops; | 59 | static const struct rpc_credops gss_credops; |
60 | 60 | ||
61 | #ifdef RPC_DEBUG | 61 | #ifdef RPC_DEBUG |
62 | # define RPCDBG_FACILITY RPCDBG_AUTH | 62 | # define RPCDBG_FACILITY RPCDBG_AUTH |
@@ -1193,7 +1193,7 @@ out: | |||
1193 | return status; | 1193 | return status; |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | static struct rpc_authops authgss_ops = { | 1196 | static const struct rpc_authops authgss_ops = { |
1197 | .owner = THIS_MODULE, | 1197 | .owner = THIS_MODULE, |
1198 | .au_flavor = RPC_AUTH_GSS, | 1198 | .au_flavor = RPC_AUTH_GSS, |
1199 | #ifdef RPC_DEBUG | 1199 | #ifdef RPC_DEBUG |
@@ -1205,7 +1205,7 @@ static struct rpc_authops authgss_ops = { | |||
1205 | .crcreate = gss_create_cred | 1205 | .crcreate = gss_create_cred |
1206 | }; | 1206 | }; |
1207 | 1207 | ||
1208 | static struct rpc_credops gss_credops = { | 1208 | static const struct rpc_credops gss_credops = { |
1209 | .cr_name = "AUTH_GSS", | 1209 | .cr_name = "AUTH_GSS", |
1210 | .crdestroy = gss_destroy_cred, | 1210 | .crdestroy = gss_destroy_cred, |
1211 | .cr_init = gss_cred_init, | 1211 | .cr_init = gss_cred_init, |
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c index 7b1943217053..71b9daefdff3 100644 --- a/net/sunrpc/auth_gss/gss_krb5_mech.c +++ b/net/sunrpc/auth_gss/gss_krb5_mech.c | |||
@@ -201,7 +201,7 @@ gss_delete_sec_context_kerberos(void *internal_ctx) { | |||
201 | kfree(kctx); | 201 | kfree(kctx); |
202 | } | 202 | } |
203 | 203 | ||
204 | static struct gss_api_ops gss_kerberos_ops = { | 204 | static const struct gss_api_ops gss_kerberos_ops = { |
205 | .gss_import_sec_context = gss_import_sec_context_kerberos, | 205 | .gss_import_sec_context = gss_import_sec_context_kerberos, |
206 | .gss_get_mic = gss_get_mic_kerberos, | 206 | .gss_get_mic = gss_get_mic_kerberos, |
207 | .gss_verify_mic = gss_verify_mic_kerberos, | 207 | .gss_verify_mic = gss_verify_mic_kerberos, |
diff --git a/net/sunrpc/auth_gss/gss_spkm3_mech.c b/net/sunrpc/auth_gss/gss_spkm3_mech.c index 7e15aa68ae64..577d590e755f 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_mech.c +++ b/net/sunrpc/auth_gss/gss_spkm3_mech.c | |||
@@ -202,7 +202,7 @@ gss_get_mic_spkm3(struct gss_ctx *ctx, | |||
202 | return err; | 202 | return err; |
203 | } | 203 | } |
204 | 204 | ||
205 | static struct gss_api_ops gss_spkm3_ops = { | 205 | static const struct gss_api_ops gss_spkm3_ops = { |
206 | .gss_import_sec_context = gss_import_sec_context_spkm3, | 206 | .gss_import_sec_context = gss_import_sec_context_spkm3, |
207 | .gss_get_mic = gss_get_mic_spkm3, | 207 | .gss_get_mic = gss_get_mic_spkm3, |
208 | .gss_verify_mic = gss_verify_mic_spkm3, | 208 | .gss_verify_mic = gss_verify_mic_spkm3, |
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index 890bd9b3794b..fe9b6aaf91eb 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c | |||
@@ -101,7 +101,7 @@ nul_validate(struct rpc_task *task, __be32 *p) | |||
101 | return p; | 101 | return p; |
102 | } | 102 | } |
103 | 103 | ||
104 | 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 | 107 | #ifdef RPC_DEBUG |
@@ -122,7 +122,7 @@ struct rpc_auth null_auth = { | |||
122 | }; | 122 | }; |
123 | 123 | ||
124 | static | 124 | static |
125 | struct rpc_credops null_credops = { | 125 | const struct rpc_credops null_credops = { |
126 | .cr_name = "AUTH_NULL", | 126 | .cr_name = "AUTH_NULL", |
127 | .crdestroy = nul_destroy_cred, | 127 | .crdestroy = nul_destroy_cred, |
128 | .crmatch = nul_match, | 128 | .crmatch = nul_match, |
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index e54782e75d59..6600c7ad72a9 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
@@ -34,7 +34,7 @@ struct unx_cred { | |||
34 | 34 | ||
35 | static struct rpc_auth unix_auth; | 35 | static struct rpc_auth unix_auth; |
36 | static struct rpc_cred_cache unix_cred_cache; | 36 | static struct rpc_cred_cache unix_cred_cache; |
37 | static struct rpc_credops unix_credops; | 37 | static const struct rpc_credops unix_credops; |
38 | 38 | ||
39 | static struct rpc_auth * | 39 | static struct rpc_auth * |
40 | unx_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor) | 40 | unx_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor) |
@@ -205,7 +205,7 @@ unx_validate(struct rpc_task *task, __be32 *p) | |||
205 | return p; | 205 | return p; |
206 | } | 206 | } |
207 | 207 | ||
208 | struct rpc_authops authunix_ops = { | 208 | const struct rpc_authops authunix_ops = { |
209 | .owner = THIS_MODULE, | 209 | .owner = THIS_MODULE, |
210 | .au_flavor = RPC_AUTH_UNIX, | 210 | .au_flavor = RPC_AUTH_UNIX, |
211 | #ifdef RPC_DEBUG | 211 | #ifdef RPC_DEBUG |
@@ -233,7 +233,7 @@ struct rpc_auth unix_auth = { | |||
233 | }; | 233 | }; |
234 | 234 | ||
235 | static | 235 | static |
236 | struct rpc_credops unix_credops = { | 236 | const struct rpc_credops unix_credops = { |
237 | .cr_name = "AUTH_UNIX", | 237 | .cr_name = "AUTH_UNIX", |
238 | .crdestroy = unx_destroy_cred, | 238 | .crdestroy = unx_destroy_cred, |
239 | .crmatch = unx_match, | 239 | .crmatch = unx_match, |