linux/security/integrity
Dmitry Kasatkin 4e9c74a333 ima: provide flag to identify new empty files
commit b151d6b00b upstream.

On ima_file_free(), newly created empty files are not labeled with
an initial security.ima value, because the iversion did not change.
Commit dff6efc "fs: fix iversion handling" introduced a change in
iversion behavior.  To verify this change use the shell command:

  $ (exec >foo)
  $ getfattr -h -e hex -d -m security foo

This patch defines the IMA_NEW_FILE flag.  The flag is initially
set, when IMA detects that a new file is created, and subsequently
checked on the ima_file_free() hook to set the initial security.ima
value.

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 09:38:24 -07:00
..
evm evm: prohibit userspace writing 'security.evm' HMAC value 2014-06-26 15:15:38 -04:00
ima ima: provide flag to identify new empty files 2014-10-30 09:38:24 -07:00
Kconfig integrity: move integrity_audit_msg() 2013-06-20 07:47:49 -04:00
Makefile integrity: move integrity_audit_msg() 2013-06-20 07:47:49 -04:00
digsig.c Revert "ima: define '_ima' as a builtin 'trusted' keyring" 2013-11-23 16:36:35 -08:00
digsig_asymmetric.c ima: read and use signature hash algorithm 2013-10-25 17:16:59 -04:00
iint.c ima: use dynamically allocated hash storage 2013-10-25 17:17:00 -04:00
integrity.h ima: provide flag to identify new empty files 2014-10-30 09:38:24 -07:00
integrity_audit.c integrity: move integrity_audit_msg() 2013-06-20 07:47:49 -04:00