Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
auth.c File Reference
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/hash.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/gss_api.h>
#include <linux/spinlock.h>

Go to the source code of this file.

Data Structures

struct  rpc_cred_cache
 

Macros

#define RPC_CREDCACHE_DEFAULT_HASHBITS   (4)
 
#define MAX_HASHTABLE_BITS   (14)
 
#define param_check_hashtbl_sz(name, p)   __param_check(name, p, unsigned int);
 
#define RPC_AUTH_EXPIRY_MORATORIUM   (60 * HZ)
 

Functions

 module_param_named (auth_hashtable_size, auth_hashbits, hashtbl_sz, 0644)
 
 MODULE_PARM_DESC (auth_hashtable_size,"RPC credential cache hashtable size")
 
int rpcauth_register (const struct rpc_authops *ops)
 
 EXPORT_SYMBOL_GPL (rpcauth_register)
 
int rpcauth_unregister (const struct rpc_authops *ops)
 
 EXPORT_SYMBOL_GPL (rpcauth_unregister)
 
int rpcauth_list_flavors (rpc_authflavor_t *array, int size)
 
 EXPORT_SYMBOL_GPL (rpcauth_list_flavors)
 
struct rpc_auth * rpcauth_create (rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt)
 
 EXPORT_SYMBOL_GPL (rpcauth_create)
 
void rpcauth_release (struct rpc_auth *auth)
 
int rpcauth_init_credcache (struct rpc_auth *auth)
 
 EXPORT_SYMBOL_GPL (rpcauth_init_credcache)
 
void rpcauth_clear_credcache (struct rpc_cred_cache *cache)
 
void rpcauth_destroy_credcache (struct rpc_auth *auth)
 
 EXPORT_SYMBOL_GPL (rpcauth_destroy_credcache)
 
struct rpc_cred * rpcauth_lookup_credcache (struct rpc_auth *auth, struct auth_cred *acred, int flags)
 
 EXPORT_SYMBOL_GPL (rpcauth_lookup_credcache)
 
struct rpc_cred * rpcauth_lookupcred (struct rpc_auth *auth, int flags)
 
void rpcauth_init_cred (struct rpc_cred *cred, const struct auth_cred *acred, struct rpc_auth *auth, const struct rpc_credops *ops)
 
 EXPORT_SYMBOL_GPL (rpcauth_init_cred)
 
struct rpc_cred * rpcauth_generic_bind_cred (struct rpc_task *task, struct rpc_cred *cred, int lookupflags)
 
 EXPORT_SYMBOL_GPL (rpcauth_generic_bind_cred)
 
void put_rpccred (struct rpc_cred *cred)
 
 EXPORT_SYMBOL_GPL (put_rpccred)
 
__be32rpcauth_marshcred (struct rpc_task *task, __be32 *p)
 
__be32rpcauth_checkverf (struct rpc_task *task, __be32 *p)
 
int rpcauth_wrap_req (struct rpc_task *task, kxdreproc_t encode, void *rqstp, __be32 *data, void *obj)
 
int rpcauth_unwrap_resp (struct rpc_task *task, kxdrdproc_t decode, void *rqstp, __be32 *data, void *obj)
 
int rpcauth_refreshcred (struct rpc_task *task)
 
void rpcauth_invalcred (struct rpc_task *task)
 
int rpcauth_uptodatecred (struct rpc_task *task)
 
int __init rpcauth_init_module (void)
 
void rpcauth_remove_module (void)
 

Macro Definition Documentation

#define MAX_HASHTABLE_BITS   (14)

Definition at line 42 of file auth.c.

#define param_check_hashtbl_sz (   name,
  p 
)    __param_check(name, p, unsigned int);

Definition at line 73 of file auth.c.

#define RPC_AUTH_EXPIRY_MORATORIUM   (60 * HZ)

Definition at line 338 of file auth.c.

#define RPC_CREDCACHE_DEFAULT_HASHBITS   (4)

Definition at line 23 of file auth.c.

Function Documentation

EXPORT_SYMBOL_GPL ( rpcauth_register  )
EXPORT_SYMBOL_GPL ( rpcauth_unregister  )
EXPORT_SYMBOL_GPL ( rpcauth_list_flavors  )
EXPORT_SYMBOL_GPL ( rpcauth_create  )
EXPORT_SYMBOL_GPL ( rpcauth_init_credcache  )
EXPORT_SYMBOL_GPL ( rpcauth_destroy_credcache  )
EXPORT_SYMBOL_GPL ( rpcauth_lookup_credcache  )
EXPORT_SYMBOL_GPL ( rpcauth_init_cred  )
EXPORT_SYMBOL_GPL ( rpcauth_generic_bind_cred  )
EXPORT_SYMBOL_GPL ( put_rpccred  )
module_param_named ( auth_hashtable_size  ,
auth_hashbits  ,
hashtbl_sz  ,
0644   
)
MODULE_PARM_DESC ( auth_hashtable_size  ,
"RPC credential cache hashtable size  
)
void put_rpccred ( struct rpc_cred *  cred)

Definition at line 565 of file auth.c.

__be32* rpcauth_checkverf ( struct rpc_task task,
__be32 p 
)

Definition at line 612 of file auth.c.

void rpcauth_clear_credcache ( struct rpc_cred_cache cache)

Definition at line 292 of file auth.c.

struct rpc_auth* rpcauth_create ( rpc_authflavor_t  pseudoflavor,
struct rpc_clnt clnt 
)
read

Definition at line 180 of file auth.c.

void rpcauth_destroy_credcache ( struct rpc_auth *  auth)

Definition at line 324 of file auth.c.

struct rpc_cred* rpcauth_generic_bind_cred ( struct rpc_task task,
struct rpc_cred *  cred,
int  lookupflags 
)
read

Definition at line 509 of file auth.c.

void rpcauth_init_cred ( struct rpc_cred *  cred,
const struct auth_cred *  acred,
struct rpc_auth *  auth,
const struct rpc_credops *  ops 
)

Definition at line 492 of file auth.c.

int rpcauth_init_credcache ( struct rpc_auth *  auth)

Definition at line 249 of file auth.c.

int __init rpcauth_init_module ( void  )

Definition at line 719 of file auth.c.

void rpcauth_invalcred ( struct rpc_task task)

Definition at line 695 of file auth.c.

int rpcauth_list_flavors ( rpc_authflavor_t *  array,
int  size 
)

rpcauth_list_flavors - discover registered flavors and pseudoflavors : array to fill in : size of "array"

Returns the number of array items filled in, or a negative errno.

The returned array is not sorted by any policy. Callers should not rely on the order of the items in the returned array.

Definition at line 137 of file auth.c.

struct rpc_cred* rpcauth_lookup_credcache ( struct rpc_auth *  auth,
struct auth_cred *  acred,
int  flags 
)
read

Definition at line 405 of file auth.c.

struct rpc_cred* rpcauth_lookupcred ( struct rpc_auth *  auth,
int  flags 
)
read

Definition at line 472 of file auth.c.

__be32* rpcauth_marshcred ( struct rpc_task task,
__be32 p 
)

Definition at line 601 of file auth.c.

int rpcauth_refreshcred ( struct rpc_task task)

Definition at line 672 of file auth.c.

int rpcauth_register ( const struct rpc_authops *  ops)

Definition at line 91 of file auth.c.

void rpcauth_release ( struct rpc_auth *  auth)

Definition at line 213 of file auth.c.

void rpcauth_remove_module ( void  )

Definition at line 737 of file auth.c.

int rpcauth_unregister ( const struct rpc_authops *  ops)

Definition at line 109 of file auth.c.

int rpcauth_unwrap_resp ( struct rpc_task task,
kxdrdproc_t  decode,
void rqstp,
__be32 data,
void obj 
)

Definition at line 657 of file auth.c.

int rpcauth_uptodatecred ( struct rpc_task task)

Definition at line 706 of file auth.c.

int rpcauth_wrap_req ( struct rpc_task task,
kxdreproc_t  encode,
void rqstp,
__be32 data,
void obj 
)

Definition at line 632 of file auth.c.