2018-06-23 13:00:56 +00:00
|
|
|
## <summary>libmtp: An Initiatior implementation of the Media Transfer Protocol (MTP).</summary>
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
## <summary>
|
|
|
|
## Role access for libmtp.
|
|
|
|
## </summary>
|
2021-08-08 16:02:14 +00:00
|
|
|
## <param name="role_prefix">
|
2018-06-23 13:00:56 +00:00
|
|
|
## <summary>
|
2021-08-08 16:02:14 +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 16:02:14 +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 16:02:14 +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 16:02:14 +00:00
|
|
|
template(`libmtp_role',`
|
2018-06-23 13:00:56 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute_role libmtp_roles;
|
|
|
|
type libmtp_t, libmtp_exec_t;
|
|
|
|
')
|
|
|
|
|
2021-08-08 16:02:14 +00:00
|
|
|
roleattribute $4 libmtp_roles;
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2021-08-08 16:02:14 +00:00
|
|
|
domtrans_pattern($3, libmtp_exec_t, libmtp_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2021-08-08 16:02:14 +00:00
|
|
|
allow $3 libmtp_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($3, libmtp_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
systemd_user_app_status($1, libmtp_t)
|
|
|
|
')
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|