security/safesetid/lsm.h
Source file repositories/reference/linux-study-clean/security/safesetid/lsm.h
File Facts
- System
- Linux kernel
- Corpus path
security/safesetid/lsm.h- Extension
.h- Size
- 1772 bytes
- Lines
- 76
- Domain
- Core OS
- Bucket
- Security And Isolation
- 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/types.hlinux/uidgid.hlinux/hashtable.h
Detected Declarations
struct setid_rulestruct setid_rulesetenum sid_policy_typeenum setid_type
Annotated Snippet
struct setid_rule {
struct hlist_node next;
kid_t src_id;
kid_t dst_id;
/* Flag to signal if rule is for UID's or GID's */
enum setid_type type;
};
#define SETID_HASH_BITS 8 /* 256 buckets in hash table */
/* Extension of INVALID_UID/INVALID_GID for kid_t type */
#define INVALID_ID (kid_t){.uid = INVALID_UID}
struct setid_ruleset {
DECLARE_HASHTABLE(rules, SETID_HASH_BITS);
char *policy_str;
struct rcu_head rcu;
//Flag to signal if ruleset is for UID's or GID's
enum setid_type type;
};
enum sid_policy_type _setid_policy_lookup(struct setid_ruleset *policy,
kid_t src, kid_t dst);
extern struct setid_ruleset __rcu *safesetid_setuid_rules;
extern struct setid_ruleset __rcu *safesetid_setgid_rules;
int safesetid_init_securityfs(void);
#endif /* _SAFESETID_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/uidgid.h`, `linux/hashtable.h`.
- Detected declarations: `struct setid_rule`, `struct setid_ruleset`, `enum sid_policy_type`, `enum setid_type`.
- Atlas domain: Core OS / Security And Isolation.
- 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.