xref: /linux/security/apparmor/include/domain.h (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1b886d83cSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2898127c3SJohn Johansen /*
3898127c3SJohn Johansen  * AppArmor security module
4898127c3SJohn Johansen  *
5898127c3SJohn Johansen  * This file contains AppArmor security domain transition function definitions.
6898127c3SJohn Johansen  *
7898127c3SJohn Johansen  * Copyright (C) 1998-2008 Novell/SUSE
8898127c3SJohn Johansen  * Copyright 2009-2010 Canonical Ltd.
9898127c3SJohn Johansen  */
10898127c3SJohn Johansen 
11898127c3SJohn Johansen #include <linux/binfmts.h>
12898127c3SJohn Johansen #include <linux/types.h>
13898127c3SJohn Johansen 
142ea3ffb7SJohn Johansen #include "label.h"
152ea3ffb7SJohn Johansen 
16898127c3SJohn Johansen #ifndef __AA_DOMAIN_H
17898127c3SJohn Johansen #define __AA_DOMAIN_H
18898127c3SJohn Johansen 
19df8073c6SJohn Johansen #define AA_CHANGE_NOFLAGS 0
20df8073c6SJohn Johansen #define AA_CHANGE_TEST 1
21df8073c6SJohn Johansen #define AA_CHANGE_CHILD 2
22df8073c6SJohn Johansen #define AA_CHANGE_ONEXEC  4
2340cde7fcSJohn Johansen #define AA_CHANGE_STACK 8
24df8073c6SJohn Johansen 
252ea3ffb7SJohn Johansen struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
262ea3ffb7SJohn Johansen 				const char **name);
272ea3ffb7SJohn Johansen 
28*b8bff599SEric W. Biederman int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm);
29898127c3SJohn Johansen 
30df8073c6SJohn Johansen int aa_change_hat(const char *hats[], int count, u64 token, int flags);
31df8073c6SJohn Johansen int aa_change_profile(const char *fqname, int flags);
32898127c3SJohn Johansen 
33898127c3SJohn Johansen #endif /* __AA_DOMAIN_H */
34