Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * AppArmor security module
0004  *
0005  * This file contains AppArmor security domain transition function definitions.
0006  *
0007  * Copyright (C) 1998-2008 Novell/SUSE
0008  * Copyright 2009-2010 Canonical Ltd.
0009  */
0010 
0011 #include <linux/binfmts.h>
0012 #include <linux/types.h>
0013 
0014 #include "label.h"
0015 
0016 #ifndef __AA_DOMAIN_H
0017 #define __AA_DOMAIN_H
0018 
0019 struct aa_domain {
0020     int size;
0021     char **table;
0022 };
0023 
0024 #define AA_CHANGE_NOFLAGS 0
0025 #define AA_CHANGE_TEST 1
0026 #define AA_CHANGE_CHILD 2
0027 #define AA_CHANGE_ONEXEC  4
0028 #define AA_CHANGE_STACK 8
0029 
0030 struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
0031                 const char **name);
0032 
0033 int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm);
0034 
0035 void aa_free_domain_entries(struct aa_domain *domain);
0036 int aa_change_hat(const char *hats[], int count, u64 token, int flags);
0037 int aa_change_profile(const char *fqname, int flags);
0038 
0039 #endif /* __AA_DOMAIN_H */