summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorDaniel Glöckner <dg@emlix.com>2017-02-24 15:05:14 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-25 14:30:09 +0200
commit08e589a97d3884820ccbb96fe58af36ae544e31e (patch)
tree1074487914a873387b52b5f55156a2010b4180ab /fs/super.c
parent0c99c8a22cc4ce06cb6af3cf9113fa93d1408470 (diff)
downloadlinux-stable-08e589a97d3884820ccbb96fe58af36ae544e31e.tar.gz
linux-stable-08e589a97d3884820ccbb96fe58af36ae544e31e.tar.bz2
linux-stable-08e589a97d3884820ccbb96fe58af36ae544e31e.zip
ima: accept previously set IMA_NEW_FILE
commit 1ac202e978e18f045006d75bd549612620c6ec3a upstream. Modifying the attributes of a file makes ima_inode_post_setattr reset the IMA cache flags. So if the file, which has just been created, is opened a second time before the first file descriptor is closed, verification fails since the security.ima xattr has not been written yet. We therefore have to look at the IMA_NEW_FILE even if the file already existed. With this patch there should no longer be an error when cat tries to open testfile: $ rm -f testfile $ ( echo test >&3 ; touch testfile ; cat testfile ) 3>testfile A file being new is no reason to accept that it is missing a digital signature demanded by the policy. Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/super.c')
0 files changed, 0 insertions, 0 deletions