blob: 656fdb81c8a0a08836b12ed614334222c0648212 [file] [log] [blame]
John Johansen0ed3b282010-07-29 14:48:05 -07001/*
2 * AppArmor security module
3 *
4 * This file contains AppArmor ipc mediation function definitions.
5 *
6 * Copyright (C) 1998-2008 Novell/SUSE
John Johansenb2d09ae2017-06-09 14:22:14 -07007 * Copyright 2009-2017 Canonical Ltd.
John Johansen0ed3b282010-07-29 14:48:05 -07008 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation, version 2 of the
12 * License.
13 */
14
15#ifndef __AA_IPC_H
16#define __AA_IPC_H
17
18#include <linux/sched.h>
19
20struct aa_profile;
21
John Johansenb2d09ae2017-06-09 14:22:14 -070022#define AA_PTRACE_TRACE MAY_WRITE
23#define AA_PTRACE_READ MAY_READ
John Johansen290f4582017-06-09 14:38:35 -070024#define AA_MAY_BE_TRACED AA_MAY_APPEND
25#define AA_MAY_BE_READ AA_MAY_CREATE
26#define PTRACE_PERM_SHIFT 2
27
28#define AA_PTRACE_PERM_MASK (AA_PTRACE_READ | AA_PTRACE_TRACE | \
29 AA_MAY_BE_READ | AA_MAY_BE_TRACED)
John Johansen0ed3b282010-07-29 14:48:05 -070030
John Johansenb2d09ae2017-06-09 14:22:14 -070031int aa_may_ptrace(struct aa_label *tracer, struct aa_label *tracee,
32 u32 request);
John Johansen0ed3b282010-07-29 14:48:05 -070033
34#endif /* __AA_IPC_H */