2018-06-23 13:00:56 +00:00
|
|
|
## <summary>Modular screen saver and locker for X11.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Role access for xscreensaver.
|
|
|
|
## </summary>
|
2021-08-08 15:17:52 +00:00
|
|
|
## <param name="role_prefix">
|
2018-06-23 13:00:56 +00:00
|
|
|
## <summary>
|
2021-08-08 15:17:52 +00:00
|
|
|
## The prefix of the user role (e.g., user
|
|
|
|
## is the prefix for user_r).
|
2018-06-23 13:00:56 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
2021-08-08 15:17:52 +00:00
|
|
|
## <param name="user_domain">
|
2018-06-23 13:00:56 +00:00
|
|
|
## <summary>
|
|
|
|
## User domain for the role.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2021-08-08 15:17:52 +00:00
|
|
|
## <param name="user_exec_domain">
|
|
|
|
## <summary>
|
|
|
|
## User exec domain for execute and transition access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2018-06-23 13:00:56 +00:00
|
|
|
#
|
2021-08-08 15:17:52 +00:00
|
|
|
template(`xscreensaver_role',`
|
2018-06-23 13:00:56 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute_role xscreensaver_roles;
|
|
|
|
attribute_role xscreensaver_helper_roles;
|
|
|
|
type xscreensaver_t, xscreensaver_exec_t;
|
|
|
|
type xscreensaver_helper_t;
|
|
|
|
type xscreensaver_config_t, xscreensaver_tmpfs_t;
|
|
|
|
')
|
|
|
|
|
2021-08-08 15:17:52 +00:00
|
|
|
roleattribute $4 xscreensaver_roles;
|
|
|
|
roleattribute $4 xscreensaver_helper_roles;
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2021-08-08 15:17:52 +00:00
|
|
|
domtrans_pattern($3, xscreensaver_exec_t, xscreensaver_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2021-08-08 15:17:52 +00:00
|
|
|
allow $3 xscreensaver_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($3, xscreensaver_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
allow $2 xscreensaver_config_t:file { manage_file_perms relabel_file_perms };
|
|
|
|
|
|
|
|
allow $2 xscreensaver_tmpfs_t:dir { manage_dir_perms relabel_dir_perms };
|
|
|
|
allow $2 xscreensaver_tmpfs_t:file { manage_file_perms relabel_file_perms };
|
|
|
|
|
2021-08-08 15:17:52 +00:00
|
|
|
allow xscreensaver_helper_t $3:fd use;
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
systemd_user_app_status($1, xscreensaver_t)
|
|
|
|
')
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|