linux/net/sunrpc/auth_unix.c

// SPDX-License-Identifier: GPL-2.0
/*
 * linux/net/sunrpc/auth_unix.c
 *
 * UNIX-style authentication; no AUTH_SHORT support
 *
 * Copyright (C) 1996, Olaf Kirch <[email protected]>
 */

#include <linux/slab.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/mempool.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/auth.h>
#include <linux/user_namespace.h>


#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
#define RPCDBG_FACILITY
#endif

static struct rpc_auth		unix_auth;
static const struct rpc_credops	unix_credops;
static mempool_t		*unix_pool;

static struct rpc_auth *
unx_create(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt)
{}

static void
unx_destroy(struct rpc_auth *auth)
{}

/*
 * Lookup AUTH_UNIX creds for current process
 */
static struct rpc_cred *unx_lookup_cred(struct rpc_auth *auth,
					struct auth_cred *acred, int flags)
{}

static void
unx_free_cred_callback(struct rcu_head *head)
{}

static void
unx_destroy_cred(struct rpc_cred *cred)
{}

/*
 * Match credentials against current the auth_cred.
 */
static int
unx_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
{}

/*
 * Marshal credentials.
 * Maybe we should keep a cached credential for performance reasons.
 */
static int
unx_marshal(struct rpc_task *task, struct xdr_stream *xdr)
{}

/*
 * Refresh credentials. This is a no-op for AUTH_UNIX
 */
static int
unx_refresh(struct rpc_task *task)
{}

static int
unx_validate(struct rpc_task *task, struct xdr_stream *xdr)
{}

int __init rpc_init_authunix(void)
{}

void rpc_destroy_authunix(void)
{}

const struct rpc_authops authunix_ops =;

static
struct rpc_auth		unix_auth =;

static
const struct rpc_credops unix_credops =;