static struct rpc_auth * nul_create(struct rpc_clnt *clnt) { struct rpc_auth *auth; dprintk("RPC: creating NULL authenticator for client %p\n", clnt); if (!(auth = (struct rpc_auth *) rpc_allocate(0, sizeof(*auth)))) return NULL; auth->au_cslack = 4; auth->au_rslack = 2; auth->au_ops = &authnull_ops; auth->au_expire = 1800 * HZ; rpcauth_init_credcache(auth); return (struct rpc_auth *) auth; }
static struct rpc_auth * unx_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor) { struct rpc_auth *auth; dprintk("RPC: creating UNIX authenticator for client %p\n", clnt); if (!(auth = (struct rpc_auth *) kmalloc(sizeof(*auth), GFP_KERNEL))) return NULL; auth->au_cslack = UNX_WRITESLACK; auth->au_rslack = 2; /* assume AUTH_NULL verf */ auth->au_expire = UNX_CRED_EXPIRE; auth->au_ops = &authunix_ops; rpcauth_init_credcache(auth); return auth; }
int __init rpc_init_authunix(void) { return rpcauth_init_credcache(&unix_auth); }
int __init rpc_init_generic_auth(void) { return rpcauth_init_credcache(&generic_auth); }