David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * AppArmor security module |
| 4 | * |
| 5 | * This file contains AppArmor ipc mediation function definitions. |
| 6 | * |
| 7 | * Copyright (C) 1998-2008 Novell/SUSE |
| 8 | * Copyright 2009-2017 Canonical Ltd. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __AA_IPC_H |
| 12 | #define __AA_IPC_H |
| 13 | |
| 14 | #include <linux/sched.h> |
| 15 | |
| 16 | struct aa_profile; |
| 17 | |
| 18 | #define AA_PTRACE_TRACE MAY_WRITE |
| 19 | #define AA_PTRACE_READ MAY_READ |
| 20 | #define AA_MAY_BE_TRACED AA_MAY_APPEND |
| 21 | #define AA_MAY_BE_READ AA_MAY_CREATE |
| 22 | #define PTRACE_PERM_SHIFT 2 |
| 23 | |
| 24 | #define AA_PTRACE_PERM_MASK (AA_PTRACE_READ | AA_PTRACE_TRACE | \ |
| 25 | AA_MAY_BE_READ | AA_MAY_BE_TRACED) |
| 26 | #define AA_SIGNAL_PERM_MASK (MAY_READ | MAY_WRITE) |
| 27 | |
| 28 | #define AA_SFS_SIG_MASK "hup int quit ill trap abrt bus fpe kill usr1 " \ |
| 29 | "segv usr2 pipe alrm term stkflt chld cont stop stp ttin ttou urg " \ |
| 30 | "xcpu xfsz vtalrm prof winch io pwr sys emt lost" |
| 31 | |
| 32 | int aa_may_ptrace(struct aa_label *tracer, struct aa_label *tracee, |
| 33 | u32 request); |
| 34 | int aa_may_signal(struct aa_label *sender, struct aa_label *target, int sig); |
| 35 | |
| 36 | #endif /* __AA_IPC_H */ |