mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
add a named match group to RE_PROFILE_SIGNAL
As a preparation for the SignalRule class, add a <details> match group to RE_PROFILE_SIGNAL. Also adjust test-regex_matches.py for the added group. Note: RE_PROFILE_SIGNAL is only used in aa.py, and only matches[0..2] are used. 0 and 1 are audit and allow/deny and 2 is and stays the whole rule (except audit and allow/deny). Therefore no aa.py changes are needed. Acked-by: John Johansen <john.johansen@canonical.com> for trunk and 2.10
This commit is contained in:
@@ -299,18 +299,14 @@ class AARegexSignal(AARegexTest):
|
||||
self.regex = aa.RE_PROFILE_SIGNAL
|
||||
|
||||
tests = [
|
||||
(' signal,', (None, None, 'signal,', None)),
|
||||
(' audit signal,', ('audit', None, 'signal,', None)),
|
||||
(' signal receive,', (None, None, 'signal receive,', None)),
|
||||
(' signal (send, receive),',
|
||||
(None, None, 'signal (send, receive),', None)),
|
||||
(' audit signal (receive),',
|
||||
('audit', None, 'signal (receive),', None)),
|
||||
(' signal (send, receive) set=(usr1 usr2),',
|
||||
(None, None, 'signal (send, receive) set=(usr1 usr2),', None)),
|
||||
(' signal send set=(hup, quit) peer=/usr/sbin/daemon,',
|
||||
(None, None,
|
||||
'signal send set=(hup, quit) peer=/usr/sbin/daemon,', None)),
|
||||
(' signal,', (None, None, 'signal,', None, None)),
|
||||
(' audit signal,', ('audit', None, 'signal,', None, None)),
|
||||
(' signal receive,', (None, None, 'signal receive,', 'receive', None)),
|
||||
(' signal (send, receive),', (None, None, 'signal (send, receive),', '(send, receive)', None)),
|
||||
(' audit signal (receive),', ('audit', None, 'signal (receive),', '(receive)', None)),
|
||||
(' signal (send, receive) set=(usr1 usr2),', (None, None, 'signal (send, receive) set=(usr1 usr2),', '(send, receive) set=(usr1 usr2)', None)),
|
||||
(' signal send set=(hup, quit) peer=/usr/sbin/daemon,', (None, None, 'signal send set=(hup, quit) peer=/usr/sbin/daemon,',
|
||||
'send set=(hup, quit) peer=/usr/sbin/daemon', None)),
|
||||
|
||||
(' signalling,', False),
|
||||
(' audit signalling,', False),
|
||||
|
Reference in New Issue
Block a user