linux/security
Mimi Zohar 42c63330f2 ima: add ima_inode_setxattr/removexattr function and calls
Based on xattr_permission comments, the restriction to modify 'security'
xattr is left up to the underlying fs or lsm. Ensure that not just anyone
can modify or remove 'security.ima'.

Changelog v1:
- Unless IMA-APPRAISE is configured, use stub ima_inode_removexattr()/setxattr()
  functions.  (Moved ima_inode_removexattr()/setxattr() to ima_appraise.c)

Changelog:
  - take i_mutex to fix locking (Dmitry Kasatkin)
  - ima_reset_appraise_flags should only be called when modifying or
    removing the 'security.ima' xattr. Requires CAP_SYS_ADMIN privilege.
    (Incorporated fix from Roberto Sassu)
  - Even if allowed to update security.ima, reset the appraisal flags,
    forcing re-appraisal.
  - Replace CAP_MAC_ADMIN with CAP_SYS_ADMIN
  - static inline ima_inode_setxattr()/ima_inode_removexattr() stubs
  - ima_protect_xattr should be static

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
2012-09-07 14:57:47 -04:00
..
apparmor split ->file_mmap() into ->mmap_addr()/->mmap_file() 2012-05-31 13:11:54 -04:00
integrity ima: add ima_inode_setxattr/removexattr function and calls 2012-09-07 14:57:47 -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
Kconfig KEYS: Move the key config into security/keys/Kconfig 2012-05-11 10:56:56 +01:00
Makefile security: Yama LSM 2012-02-10 09:18:52 +11: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
lsm_audit.c LSM: BUILD_BUG_ON if the common_audit_data union ever grows 2012-04-09 12:23:03 -04:00
min_addr.c mmap_min_addr check CAP_SYS_RAWIO only for write 2010-04-23 08:56:31 +10:00
security.c ima: add ima_inode_setxattr/removexattr function and calls 2012-09-07 14:57:47 -04:00