^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * AppArmor security module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * This file contains AppArmor security domain transition function definitions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright (C) 1998-2008 Novell/SUSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Copyright 2009-2010 Canonical Ltd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/binfmts.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include "label.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #ifndef __AA_DOMAIN_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define __AA_DOMAIN_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) struct aa_domain {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) int size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) char **table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define AA_CHANGE_NOFLAGS 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define AA_CHANGE_TEST 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #define AA_CHANGE_CHILD 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define AA_CHANGE_ONEXEC 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define AA_CHANGE_STACK 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) const char **name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) void aa_free_domain_entries(struct aa_domain *domain);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) int aa_change_hat(const char *hats[], int count, u64 token, int flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) int aa_change_profile(const char *fqname, int flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #endif /* __AA_DOMAIN_H */