summaryrefslogtreecommitdiff
path: root/certs/system_keyring.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2020-11-03 19:49:38 +0300
committerPaul Moore <paul@paul-moore.com>2020-11-06 06:47:31 +0300
commit200ea5a2292dc444a818b096ae6a32ba3caa51b9 (patch)
tree399427f050ca3db3ed79628ef296d2200c605f6c /certs/system_keyring.c
parent44141f58e14317853698f994ca5c3785a0c230d0 (diff)
downloadlinux-200ea5a2292dc444a818b096ae6a32ba3caa51b9.tar.xz
selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling
A previous fix, commit 83370b31a915 ("selinux: fix error initialization in inode_doinit_with_dentry()"), changed how failures were handled before a SELinux policy was loaded. Unfortunately that patch was potentially problematic for two reasons: it set the isec->initialized state without holding a lock, and it didn't set the inode's SELinux label to the "default" for the particular filesystem. The later can be a problem if/when a later attempt to revalidate the inode fails and SELinux reverts to the existing inode label. This patch should restore the default inode labeling that existed before the original fix, without affecting the LABEL_INVALID marking such that revalidation will still be attempted in the future. Fixes: 83370b31a915 ("selinux: fix error initialization in inode_doinit_with_dentry()") Reported-by: Sven Schnelle <svens@linux.ibm.com> Tested-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'certs/system_keyring.c')
0 files changed, 0 insertions, 0 deletions