summaryrefslogtreecommitdiffstats
path: root/fs/attr.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.de>2018-10-09 10:12:33 -0500
committerMimi Zohar <zohar@linux.ibm.com>2018-10-10 15:18:00 -0400
commita408e4a86b36bf98ad15b9ada531cf0e5118ac67 (patch)
tree7c801d1417656f68fd2c6ee70a01cf34ba389eb7 /fs/attr.c
parent1e4c8dafbb6bf72fb5eca035b861e39c5896c2b7 (diff)
downloadtalos-op-linux-a408e4a86b36bf98ad15b9ada531cf0e5118ac67.tar.gz
talos-op-linux-a408e4a86b36bf98ad15b9ada531cf0e5118ac67.zip
ima: open a new file instance if no read permissions
Open a new file instance as opposed to changing file->f_mode when the file is not readable. This is done to accomodate overlayfs stacked file operations change. The real struct file is hidden behind the overlays struct file. So, any file->f_mode manipulations are not reflected on the real struct file. Open the file again in read mode if original file cannot be read, read and calculate the hash. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Cc: stable@vger.kernel.org (linux-4.19) Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'fs/attr.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud