include/linux/sunrpc/auth.h
Source file repositories/reference/linux-study-clean/include/linux/sunrpc/auth.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sunrpc/auth.h- Extension
.h- Size
- 6261 bytes
- Lines
- 198
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sunrpc/sched.hlinux/sunrpc/msg_prot.hlinux/sunrpc/xdr.hlinux/atomic.hlinux/rcupdate.hlinux/uidgid.hlinux/utsname.h
Detected Declarations
struct rpcsec_gss_infostruct auth_credstruct rpc_authstruct rpc_credopsstruct rpc_credstruct rpc_cred_cachestruct rpc_authopsstruct rpc_authstruct rpc_auth_create_argsstruct rpc_authopsstruct rpc_credops
Annotated Snippet
struct auth_cred {
const struct cred *cred;
const char *principal; /* If present, this is a machine credential */
};
/*
* Client user credentials
*/
struct rpc_auth;
struct rpc_credops;
struct rpc_cred {
struct hlist_node cr_hash; /* hash chain */
struct list_head cr_lru; /* lru garbage collection */
struct rcu_head cr_rcu;
struct rpc_auth * cr_auth;
const struct rpc_credops *cr_ops;
unsigned long cr_expire; /* when to gc */
unsigned long cr_flags; /* various flags */
refcount_t cr_count; /* ref count */
const struct cred *cr_cred;
/* per-flavor data */
};
#define RPCAUTH_CRED_NEW 0
#define RPCAUTH_CRED_UPTODATE 1
#define RPCAUTH_CRED_HASHED 2
#define RPCAUTH_CRED_NEGATIVE 3
const struct cred *rpc_machine_cred(void);
/*
* Client authentication handle
*/
struct rpc_cred_cache;
struct rpc_authops;
struct rpc_auth {
unsigned int au_cslack; /* call cred size estimate */
unsigned int au_rslack; /* reply cred size estimate */
unsigned int au_verfsize; /* size of reply verifier */
unsigned int au_ralign; /* words before UL header */
unsigned long au_flags;
const struct rpc_authops *au_ops;
rpc_authflavor_t au_flavor; /* pseudoflavor (note may
* differ from the flavor in
* au_ops->au_flavor in gss
* case) */
refcount_t au_count; /* Reference counter */
struct rpc_cred_cache * au_credcache;
/* per-flavor data */
};
/* rpc_auth au_flags */
#define RPCAUTH_AUTH_DATATOUCH (1)
#define RPCAUTH_AUTH_UPDATE_SLACK (2)
struct rpc_auth_create_args {
rpc_authflavor_t pseudoflavor;
const char *target_name;
};
/* Flags for rpcauth_lookupcred() */
#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */
#define RPCAUTH_LOOKUP_ASYNC 0x02 /* Don't block waiting for memory */
/*
* Client authentication ops
*/
struct rpc_authops {
struct module *owner;
rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */
char * au_name;
struct rpc_auth * (*create)(const struct rpc_auth_create_args *,
struct rpc_clnt *);
void (*destroy)(struct rpc_auth *);
int (*hash_cred)(struct auth_cred *, unsigned int);
struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int);
struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int, gfp_t);
rpc_authflavor_t (*info2flavor)(struct rpcsec_gss_info *);
int (*flavor2info)(rpc_authflavor_t,
struct rpcsec_gss_info *);
int (*key_timeout)(struct rpc_auth *,
struct rpc_cred *);
int (*ping)(struct rpc_clnt *clnt);
};
struct rpc_credops {
const char * cr_name; /* Name of the auth flavour */
Annotation
- Immediate include surface: `linux/sunrpc/sched.h`, `linux/sunrpc/msg_prot.h`, `linux/sunrpc/xdr.h`, `linux/atomic.h`, `linux/rcupdate.h`, `linux/uidgid.h`, `linux/utsname.h`.
- Detected declarations: `struct rpcsec_gss_info`, `struct auth_cred`, `struct rpc_auth`, `struct rpc_credops`, `struct rpc_cred`, `struct rpc_cred_cache`, `struct rpc_authops`, `struct rpc_auth`, `struct rpc_auth_create_args`, `struct rpc_authops`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.