1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Landlock LSM - Network management and hooks
5 * Copyright © 2022-2023 Huawei Tech. Co., Ltd.
8 #ifndef _SECURITY_LANDLOCK_NET_H
9 #define _SECURITY_LANDLOCK_NET_H
15 #if IS_ENABLED(CONFIG_INET)
16 __init
void landlock_add_net_hooks(void);
18 int landlock_append_net_rule(struct landlock_ruleset
*const ruleset
,
19 const u16 port
, access_mask_t access_rights
);
20 #else /* IS_ENABLED(CONFIG_INET) */
21 static inline void landlock_add_net_hooks(void)
26 landlock_append_net_rule(struct landlock_ruleset
*const ruleset
, const u16 port
,
27 access_mask_t access_rights
)
31 #endif /* IS_ENABLED(CONFIG_INET) */
33 #endif /* _SECURITY_LANDLOCK_NET_H */