Skip to content

Commit

Permalink
Allow systemd-sleep create efivarfs files
Browse files Browse the repository at this point in the history
The commit addresses the following AVC denial:
type=AVC msg=audit(1700090306.889:353): avc:  denied  { write } for  pid=4539 comm="systemd-sleep" name="/" dev="efivarfs" ino=18441 scontext=system_u:system_r:systemd_sleep_t:s0 tcontext=system_u:object_r:efivarfs_t:s0 tclass=dir permissive=0

Resolves: rhbz#2249928
  • Loading branch information
zpytela committed Nov 22, 2023
1 parent 88bb752 commit be92f68
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions policy/modules/kernel/filesystem.if
Original file line number Diff line number Diff line change
Expand Up @@ -7024,6 +7024,25 @@ interface(`fs_rw_efivarfs_files',`
rw_files_pattern($1, efivarfs_t, efivarfs_t)
')

#######################################
## <summary>
## Create efivarfs files
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`fs_create_efivarfs_files',`
gen_require(`
type efivarfs_t;
')

create_files_pattern($1, efivarfs_t, efivarfs_t)
')

#######################################
## <summary>
## Manage efivarfs files
Expand Down
1 change: 1 addition & 0 deletions policy/modules/system/systemd.te
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,7 @@ dev_create_sysfs_files(systemd_sleep_t)
dev_rw_sysfs(systemd_sleep_t)
dev_write_kmsg(systemd_sleep_t)

fs_create_efivarfs_files(systemd_sleep_t)
fs_rw_efivarfs_files(systemd_sleep_t)

fstools_rw_swap_files(systemd_sleep_t)
Expand Down

0 comments on commit be92f68

Please sign in to comment.