diff options
author | Mickaël Salaün <mic@linux.microsoft.com> | 2021-04-22 17:41:13 +0200 |
---|---|---|
committer | James Morris <jamorris@linux.microsoft.com> | 2021-04-22 21:22:10 +0200 |
commit | 385975dca53eb41031d0cbd1de318eb1bc5d6bb9 (patch) | |
tree | ad268a1c1db4f879768d396bfeb03389b3b5c8f3 /security/landlock/common.h | |
parent | landlock: Add ruleset and domain management (diff) | |
download | linux-385975dca53eb41031d0cbd1de318eb1bc5d6bb9.tar.xz linux-385975dca53eb41031d0cbd1de318eb1bc5d6bb9.zip |
landlock: Set up the security framework and manage credentials
Process's credentials point to a Landlock domain, which is underneath
implemented with a ruleset. In the following commits, this domain is
used to check and enforce the ptrace and filesystem security policies.
A domain is inherited from a parent to its child the same way a thread
inherits a seccomp policy.
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
Reviewed-by: Jann Horn <jannh@google.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210422154123.13086-4-mic@digikod.net
Signed-off-by: James Morris <jamorris@linux.microsoft.com>
Diffstat (limited to 'security/landlock/common.h')
-rw-r--r-- | security/landlock/common.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/security/landlock/common.h b/security/landlock/common.h new file mode 100644 index 000000000000..5dc0fe15707d --- /dev/null +++ b/security/landlock/common.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Landlock LSM - Common constants and helpers + * + * Copyright © 2016-2020 Mickaël Salaün <mic@digikod.net> + * Copyright © 2018-2020 ANSSI + */ + +#ifndef _SECURITY_LANDLOCK_COMMON_H +#define _SECURITY_LANDLOCK_COMMON_H + +#define LANDLOCK_NAME "landlock" + +#ifdef pr_fmt +#undef pr_fmt +#endif + +#define pr_fmt(fmt) LANDLOCK_NAME ": " fmt + +#endif /* _SECURITY_LANDLOCK_COMMON_H */ |