Skip to content

Commit

Permalink
SELinux: add NFS permissions for swtpm_t
Browse files Browse the repository at this point in the history
swtpm fails with a NFS mount. `setsebool virt_use_nfs on` should fix it.

Resolves: https://issues.redhat.com/browse/RHEL-73809

Signed-off-by: Marc-André Lureau <[email protected]>
  • Loading branch information
elmarco authored and stefanberger committed Jan 20, 2025
1 parent 01e804f commit cfe93d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/selinux/swtpm.te
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require {
type virtqemud_t;
type virtqemud_tmp_t;
class file map;
tunable virt_use_nfs;
}

attribute_role swtpm_roles;
Expand Down Expand Up @@ -45,3 +46,10 @@ files_read_etc_files(swtpm_t)
auth_use_nsswitch(swtpm_t)

miscfiles_read_localization(swtpm_t)

tunable_policy(`virt_use_nfs',`
fs_manage_nfs_dirs(swtpm_t)
fs_manage_nfs_files(swtpm_t)
fs_read_nfs_symlinks(swtpm_t)
fs_mmap_nfs_files(swtpm_t)
')

0 comments on commit cfe93d9

Please sign in to comment.