diff options
Diffstat (limited to 'include/linux/sunrpc/auth.h')
| -rw-r--r-- | include/linux/sunrpc/auth.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 996df4dac7d4..5bbc447175dc 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
| @@ -54,19 +54,14 @@ struct rpc_cred { | |||
| 54 | #define RPCAUTH_CRED_NEW 0 | 54 | #define RPCAUTH_CRED_NEW 0 |
| 55 | #define RPCAUTH_CRED_UPTODATE 1 | 55 | #define RPCAUTH_CRED_UPTODATE 1 |
| 56 | #define RPCAUTH_CRED_HASHED 2 | 56 | #define RPCAUTH_CRED_HASHED 2 |
| 57 | #define RPCAUTH_CRED_NEGATIVE 3 | ||
| 57 | 58 | ||
| 58 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 | 59 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 |
| 59 | 60 | ||
| 60 | /* | 61 | /* |
| 61 | * Client authentication handle | 62 | * Client authentication handle |
| 62 | */ | 63 | */ |
| 63 | #define RPC_CREDCACHE_HASHBITS 4 | 64 | struct rpc_cred_cache; |
| 64 | #define RPC_CREDCACHE_NR (1 << RPC_CREDCACHE_HASHBITS) | ||
| 65 | struct rpc_cred_cache { | ||
| 66 | struct hlist_head hashtable[RPC_CREDCACHE_NR]; | ||
| 67 | spinlock_t lock; | ||
| 68 | }; | ||
| 69 | |||
| 70 | struct rpc_authops; | 65 | struct rpc_authops; |
| 71 | struct rpc_auth { | 66 | struct rpc_auth { |
| 72 | unsigned int au_cslack; /* call cred size estimate */ | 67 | unsigned int au_cslack; /* call cred size estimate */ |
| @@ -111,7 +106,7 @@ struct rpc_credops { | |||
| 111 | void (*crdestroy)(struct rpc_cred *); | 106 | void (*crdestroy)(struct rpc_cred *); |
| 112 | 107 | ||
| 113 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); | 108 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); |
| 114 | void (*crbind)(struct rpc_task *, struct rpc_cred *, int); | 109 | struct rpc_cred * (*crbind)(struct rpc_task *, struct rpc_cred *, int); |
| 115 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); | 110 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); |
| 116 | int (*crrefresh)(struct rpc_task *); | 111 | int (*crrefresh)(struct rpc_task *); |
| 117 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); | 112 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
| @@ -124,11 +119,12 @@ struct rpc_credops { | |||
| 124 | extern const struct rpc_authops authunix_ops; | 119 | extern const struct rpc_authops authunix_ops; |
| 125 | extern const struct rpc_authops authnull_ops; | 120 | extern const struct rpc_authops authnull_ops; |
| 126 | 121 | ||
| 127 | void __init rpc_init_authunix(void); | 122 | int __init rpc_init_authunix(void); |
| 128 | void __init rpc_init_generic_auth(void); | 123 | int __init rpc_init_generic_auth(void); |
| 129 | void __init rpcauth_init_module(void); | 124 | int __init rpcauth_init_module(void); |
| 130 | void __exit rpcauth_remove_module(void); | 125 | void __exit rpcauth_remove_module(void); |
| 131 | void __exit rpc_destroy_generic_auth(void); | 126 | void __exit rpc_destroy_generic_auth(void); |
| 127 | void rpc_destroy_authunix(void); | ||
| 132 | 128 | ||
| 133 | struct rpc_cred * rpc_lookup_cred(void); | 129 | struct rpc_cred * rpc_lookup_cred(void); |
| 134 | struct rpc_cred * rpc_lookup_machine_cred(void); | 130 | struct rpc_cred * rpc_lookup_machine_cred(void); |
| @@ -139,10 +135,8 @@ void rpcauth_release(struct rpc_auth *); | |||
| 139 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); | 135 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); |
| 140 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); | 136 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); |
| 141 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); | 137 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); |
| 142 | void rpcauth_bindcred(struct rpc_task *, struct rpc_cred *, int); | 138 | struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *, int); |
| 143 | void rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *, int); | ||
| 144 | void put_rpccred(struct rpc_cred *); | 139 | void put_rpccred(struct rpc_cred *); |
| 145 | void rpcauth_unbindcred(struct rpc_task *); | ||
| 146 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); | 140 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); |
| 147 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); | 141 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); |
| 148 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); | 142 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); |
