Commit bcbccaf2 authored by David Howells's avatar David Howells

afs: Fix SELinux setting security label on /afs

Make the AFS dynamic root superblock R/W so that SELinux can set the
security label on it.  Without this, upgrades to, say, the Fedora
filesystem-afs RPM fail if afs is mounted on it because the SELinux label
can't be (re-)applied.

It might be better to make it possible to bypass the R/O check for LSM
label application through setxattr.

Fixes: 4d673da1 ("afs: Support the AFS dynamic root")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarMarc Dionne <marc.dionne@auristor.com>
cc: selinux@vger.kernel.org
cc: linux-security-module@vger.kernel.org
parent 9bd0160d
...@@ -448,7 +448,6 @@ static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx) ...@@ -448,7 +448,6 @@ static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx)
/* allocate the root inode and dentry */ /* allocate the root inode and dentry */
if (as->dyn_root) { if (as->dyn_root) {
inode = afs_iget_pseudo_dir(sb, true); inode = afs_iget_pseudo_dir(sb, true);
sb->s_flags |= SB_RDONLY;
} else { } else {
sprintf(sb->s_id, "%llu", as->volume->vid); sprintf(sb->s_id, "%llu", as->volume->vid);
afs_activate_volume(as->volume); afs_activate_volume(as->volume);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment