summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@huawei.com>2020-04-27 12:28:55 +0200
committerMimi Zohar <zohar@linux.ibm.com>2020-05-07 21:30:58 -0400
commit0014cc04e8ec077dc482f00c87dfd949cfe2b98f (patch)
tree56b4a073bbedcf8b22daa2c8387c44f5be9878b6 /fs
parentae83d0b416db002fe95601e7f97f64b59514d936 (diff)
ima: Set file->f_mode instead of file->f_flags in ima_calc_file_hash()
Commit a408e4a86b36 ("ima: open a new file instance if no read permissions") tries to create a new file descriptor to calculate a file digest if the file has not been opened with O_RDONLY flag. However, if a new file descriptor cannot be obtained, it sets the FMODE_READ flag to file->f_flags instead of file->f_mode. This patch fixes this issue by replacing f_flags with f_mode as it was before that commit. Cc: stable@vger.kernel.org # 4.20.x Fixes: a408e4a86b36 ("ima: open a new file instance if no read permissions") Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions