Skip to content

Commit

Permalink
Add virt_create_log() and virt_write_log() interfaces
Browse files Browse the repository at this point in the history
Resolves: RHEL-47274
  • Loading branch information
zpytela committed Aug 13, 2024
1 parent 4db616e commit fb7eee5
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions policy/modules/contrib/virt.if
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,46 @@ interface(`virt_append_log',`
append_files_pattern($1, virt_log_t, virt_log_t)
')

########################################
## <summary>
## Allow the specified domain to write
## virt log files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`virt_write_log',`
gen_require(`
type virt_log_t;
')

logging_search_logs($1)
write_files_pattern($1, virt_log_t, virt_log_t)
')

########################################
## <summary>
## Allow the specified domain to create
## virt log files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`virt_create_log',`
gen_require(`
type virt_log_t;
')

logging_search_logs($1)
create_files_pattern($1, virt_log_t, virt_log_t)
')

########################################
## <summary>
## Allow domain to manage virt log files
Expand Down

0 comments on commit fb7eee5

Please sign in to comment.