security/landlock/net.h

Source file repositories/reference/linux-study-clean/security/landlock/net.h

File Facts

System
Linux kernel
Corpus path
security/landlock/net.h
Extension
.h
Size
839 bytes
Lines
35
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _SECURITY_LANDLOCK_NET_H
#define _SECURITY_LANDLOCK_NET_H

#include "common.h"
#include "ruleset.h"
#include "setup.h"

#if IS_ENABLED(CONFIG_INET)
__init void landlock_add_net_hooks(void);

int landlock_append_net_rule(struct landlock_ruleset *const ruleset,
			     const u16 port, access_mask_t access_rights,
			     const u32 flags);
#else /* IS_ENABLED(CONFIG_INET) */
static inline void landlock_add_net_hooks(void)
{
}

static inline int
landlock_append_net_rule(struct landlock_ruleset *const ruleset, const u16 port,
			 access_mask_t access_rights, const u32 flags)
{
	return -EAFNOSUPPORT;
}
#endif /* IS_ENABLED(CONFIG_INET) */

#endif /* _SECURITY_LANDLOCK_NET_H */

Annotation

Implementation Notes