alistair23-linux/security
Mimi Zohar 07f6a79415 ima: add appraise action keywords and default rules
Unlike the IMA measurement policy, the appraise policy can not be dependent
on runtime process information, such as the task uid, as the 'security.ima'
xattr is written on file close and must be updated each time the file changes,
regardless of the current task uid.

This patch extends the policy language with 'fowner', defines an appraise
policy, which appraises all files owned by root, and defines 'ima_appraise_tcb',
a new boot command line option, to enable the appraise policy.

Changelog v3:
- separate the measure from the appraise rules in order to support measuring
  without appraising and appraising without measuring.
- change appraisal default for filesystems without xattr support to fail
- update default appraise policy for cgroups

Changelog v1:
- don't appraise RAMFS (Dmitry Kasatkin)
- merged rest of "ima: ima_must_appraise_or_measure API change" commit
  (Dmtiry Kasatkin)

  ima_must_appraise_or_measure() called ima_match_policy twice, which
  searched the policy for a matching rule.  Once for a matching measurement
  rule and subsequently for an appraisal rule. Searching the policy twice
  is unnecessary overhead, which could be noticeable with a large policy.

  The new version of ima_must_appraise_or_measure() does everything in a
  single iteration using a new version of ima_match_policy().  It returns
  IMA_MEASURE, IMA_APPRAISE mask.

  With the use of action mask only one efficient matching function
  is enough.  Removed other specific versions of matching functions.

Changelog:
- change 'owner' to 'fowner' to conform to the new LSM conditions posted by
  Roberto Sassu.
- fix calls to ima_log_string()

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
2012-09-07 14:57:45 -04:00
..
apparmor split ->file_mmap() into ->mmap_addr()/->mmap_file() 2012-05-31 13:11:54 -04:00
integrity ima: add appraise action keywords and default rules 2012-09-07 14:57:45 -04:00
keys tpm: Move tpm_get_random api into the TPM device driver 2012-08-22 11:11:33 -05:00
selinux selinux: tag avc cache alloc as non-critical 2012-07-31 18:42:47 -07:00
smack smack: off by one error 2012-07-30 15:04:17 +10:00
tomoyo Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into next 2012-05-22 11:21:06 +10:00
yama Yama: handle 32-bit userspace prctl 2012-09-08 01:06:14 +10:00
capability.c split ->file_mmap() into ->mmap_addr()/->mmap_file() 2012-05-31 13:11:54 -04:00
commoncap.c split ->file_mmap() into ->mmap_addr()/->mmap_file() 2012-05-31 13:11:54 -04:00
device_cgroup.c cgroup: convert all non-memcg controllers to the new cftype interface 2012-04-01 12:09:55 -07:00
inode.c securityfs: fix object creation races 2012-01-10 10:20:35 -05:00
Kconfig KEYS: Move the key config into security/keys/Kconfig 2012-05-11 10:56:56 +01:00
lsm_audit.c LSM: BUILD_BUG_ON if the common_audit_data union ever grows 2012-04-09 12:23:03 -04:00
Makefile security: Yama LSM 2012-02-10 09:18:52 +11:00
min_addr.c
security.c security: allow Yama to be unconditionally stacked 2012-09-05 14:12:31 -07:00