mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
Move file mode regexes and add "pux"
Add the missing "pux" to PROFILE_MODE_RE and PROFILE_MODE_NT_RE. Also move those regexes and PROFILE_MODE_DENY_RE directly above validate_profile_mode() which is the only user. Acked-by: Steve Beattie <steve@nxnw.org> for trunk and 2.9
This commit is contained in:
parent
93941ff7af
commit
ece49eefc8
1 changed files with 3 additions and 4 deletions
|
@ -1503,10 +1503,6 @@ def handle_children(profile, hat, root):
|
|||
|
||||
return None
|
||||
|
||||
PROFILE_MODE_RE = re.compile('r|w|l|m|k|a|ix|ux|px|cx|pix|cix|Ux|Px|PUx|Cx|Pix|Cix')
|
||||
PROFILE_MODE_NT_RE = re.compile('r|w|l|m|k|a|x|ix|ux|px|cx|pix|cix|Ux|Px|PUx|Cx|Pix|Cix')
|
||||
PROFILE_MODE_DENY_RE = re.compile('r|w|l|m|k|a|x')
|
||||
|
||||
##### Repo related functions
|
||||
|
||||
def UI_SelectUpdatedRepoProfile(profile, p):
|
||||
|
@ -2426,6 +2422,9 @@ def collapse_log():
|
|||
if not is_known_rule(aa[profile][hat], 'network', NetworkRule(family, sock_type)):
|
||||
log_dict[aamode][profile][hat]['netdomain'][family][sock_type] = True
|
||||
|
||||
PROFILE_MODE_RE = re.compile('r|w|l|m|k|a|ix|ux|px|pux|cx|pix|cix|Ux|Px|PUx|Cx|Pix|Cix')
|
||||
PROFILE_MODE_NT_RE = re.compile('r|w|l|m|k|a|x|ix|ux|px|pux|cx|pix|cix|Ux|Px|PUx|Cx|Pix|Cix')
|
||||
PROFILE_MODE_DENY_RE = re.compile('r|w|l|m|k|a|x')
|
||||
|
||||
def validate_profile_mode(mode, allow, nt_name=None):
|
||||
if allow == 'deny':
|
||||
|
|
Loading…
Add table
Reference in a new issue