perms.h (e53cfe6c7caa79ccdccce53e600dae522acb1c84) | perms.h (aa9aeea8d4c3dfb9297723c4340671ef88e372d3) |
---|---|
1/* 2 * AppArmor security module 3 * 4 * This file contains AppArmor basic permission sets definitions. 5 * 6 * Copyright 2017 Canonical Ltd. 7 * 8 * This program is free software; you can redistribute it and/or --- 52 unchanged lines hidden (view full) --- 61 AA_MAY_GETCRED | AA_MAY_CHMOD | AA_MAY_CHOWN | \ 62 AA_MAY_CHGRP | AA_MAY_MPROT | AA_MAY_SNAPSHOT | \ 63 AA_MAY_STACK | AA_MAY_ONEXEC | \ 64 AA_MAY_CHANGE_PROFILE | AA_MAY_CHANGEHAT) 65 66extern const char aa_file_perm_chrs[]; 67extern const char *aa_file_perm_names[]; 68 | 1/* 2 * AppArmor security module 3 * 4 * This file contains AppArmor basic permission sets definitions. 5 * 6 * Copyright 2017 Canonical Ltd. 7 * 8 * This program is free software; you can redistribute it and/or --- 52 unchanged lines hidden (view full) --- 61 AA_MAY_GETCRED | AA_MAY_CHMOD | AA_MAY_CHOWN | \ 62 AA_MAY_CHGRP | AA_MAY_MPROT | AA_MAY_SNAPSHOT | \ 63 AA_MAY_STACK | AA_MAY_ONEXEC | \ 64 AA_MAY_CHANGE_PROFILE | AA_MAY_CHANGEHAT) 65 66extern const char aa_file_perm_chrs[]; 67extern const char *aa_file_perm_names[]; 68 |
69struct aa_perms { 70 u32 allow; 71 u32 audit; /* set only when allow is set */ 72 73 u32 deny; /* explicit deny, or conflict if allow also set */ 74 u32 quiet; /* set only when ~allow | deny */ 75 u32 kill; /* set only when ~allow | deny */ 76 u32 stop; /* set only when ~allow | deny */ 77 78 u32 complain; /* accumulates only used when ~allow & ~deny */ 79 u32 cond; /* set only when ~allow and ~deny */ 80 81 u32 hide; /* set only when ~allow | deny */ 82 u32 prompt; /* accumulates only used when ~allow & ~deny */ 83 84 /* Reserved: 85 * u32 subtree; / * set only when allow is set * / 86 */ 87 u16 xindex; 88}; 89 90#define ALL_PERMS_MASK 0xffffffff 91 92extern struct aa_perms allperms; 93 94struct aa_profile; 95 |
|
69void aa_perm_mask_to_str(char *str, const char *chrs, u32 mask); | 96void aa_perm_mask_to_str(char *str, const char *chrs, u32 mask); |
97void aa_audit_perm_names(struct audit_buffer *ab, const char **names, u32 mask); 98void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs, 99 u32 chrsmask, const char **names, u32 namesmask); 100void aa_apply_modes_to_perms(struct aa_profile *profile, 101 struct aa_perms *perms); 102void aa_compute_perms(struct aa_dfa *dfa, unsigned int state, 103 struct aa_perms *perms); |
|
70 71#endif /* __AA_PERM_H */ | 104 105#endif /* __AA_PERM_H */ |