OpenCloudOS-Kernel/security/apparmor/include
John Johansen cd1dbf76b2 apparmor: add the ability to mediate signals
Add signal mediation where the signal can be mediated based on the
signal, direction, or the label or the peer/target. The signal perms
are verified on a cross check to ensure policy consistency in the case
of incremental policy load/replacement.

The optimization of skipping the cross check when policy is guaranteed
to be consistent (single compile unit) remains to be done.

policy rules have the form of
  SIGNAL_RULE = [ QUALIFIERS ] 'signal' [ SIGNAL ACCESS PERMISSIONS ]
                [ SIGNAL SET ] [ SIGNAL PEER ]

  SIGNAL ACCESS PERMISSIONS = SIGNAL ACCESS | SIGNAL ACCESS LIST

  SIGNAL ACCESS LIST = '(' Comma or space separated list of SIGNAL
                           ACCESS ')'

  SIGNAL ACCESS = ( 'r' | 'w' | 'rw' | 'read' | 'write' | 'send' |
                    'receive' )

  SIGNAL SET = 'set' '=' '(' SIGNAL LIST ')'

  SIGNAL LIST = Comma or space separated list of SIGNALS

  SIGNALS = ( 'hup' | 'int' | 'quit' | 'ill' | 'trap' | 'abrt' |
              'bus' | 'fpe' | 'kill' | 'usr1' | 'segv' | 'usr2' |
	      'pipe' | 'alrm' | 'term' | 'stkflt' | 'chld' | 'cont' |
	      'stop' | 'stp' | 'ttin' | 'ttou' | 'urg' | 'xcpu' |
	      'xfsz' | 'vtalrm' | 'prof' | 'winch' | 'io' | 'pwr' |
	      'sys' | 'emt' | 'exists' | 'rtmin+0' ... 'rtmin+32'
            )

  SIGNAL PEER = 'peer' '=' AARE

eg.
  signal,                                 # allow all signals
  signal send set=(hup, kill) peer=foo,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2017-09-22 13:00:57 -07:00
..
apparmor.h apparmor: add the ability to mediate signals 2017-09-22 13:00:57 -07:00
apparmorfs.h apparmor: add policy revision file interface 2017-06-10 17:11:27 -07:00
audit.h apparmor: add the ability to mediate signals 2017-09-22 13:00:57 -07:00
capability.h apparmor: move capability checks to using labels 2017-06-10 17:11:40 -07:00
context.h apparmor: switch from profiles to using labels on contexts 2017-06-10 17:11:38 -07:00
crypto.h apparmor: allow introspecting the loaded policy pre internal transform 2017-01-16 01:18:42 -08:00
domain.h apparmor: add domain label stacking info to apparmorfs 2017-06-10 17:11:47 -07:00
file.h apparmor: move path_link mediation to using labels 2017-06-10 17:11:44 -07:00
ipc.h apparmor: add the ability to mediate signals 2017-09-22 13:00:57 -07:00
label.h apparmor: add the base fns() for domain labels 2017-06-10 17:11:38 -07:00
lib.h apparmor: move exec domain mediation to using labels 2017-06-10 17:11:46 -07:00
match.h apparmor: fix restricted endian type warnings for dfa unpack 2017-01-16 01:18:54 -08:00
path.h apparmor: Move path lookup to using preallocated buffers 2017-06-08 11:29:34 -07:00
perms.h apparmor: add cross check permission helper macros 2017-06-10 17:11:41 -07:00
policy.h apparmor: switch from profiles to using labels on contexts 2017-06-10 17:11:38 -07:00
policy_ns.h apparmor: switch from profiles to using labels on contexts 2017-06-10 17:11:38 -07:00
policy_unpack.h apparmor: move to per loaddata files, instead of replicating in profiles 2017-06-08 12:51:49 -07:00
procattr.h apparmor: switch getprocattr to using label_print fns() 2017-06-10 17:11:39 -07:00
resource.h apparmor: move resource checks to using labels 2017-06-10 17:11:40 -07:00
secid.h apparmor: rename sid to secid 2017-01-16 00:42:17 -08:00
sig_names.h apparmor: add the ability to mediate signals 2017-09-22 13:00:57 -07:00