-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add new gnome_remote_desktop_t port mapping for tcp 3389-3399 - add file type for /var/lib/gnome-remote-desktop(/.*)? - add new domain and transition for /usr/libexec/gnome-remote-desktop-daemon Resolves: RHEL-35877
- Loading branch information
1 parent
4435060
commit 3d165a6
Showing
7 changed files
with
272 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/usr/libexec/gnome-remote-desktop-daemon -- gen_context(system_u:object_r:gnome_remote_desktop_exec_t,s0) | ||
|
||
/var/lib/gnome-remote-desktop(/.*)? gen_context(system_u:object_r:gnome_remote_desktop_var_lib_t,s0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
|
||
## <summary>policy for gnome_remote_desktop</summary> | ||
|
||
######################################## | ||
## <summary> | ||
## Execute gnome_remote_desktop_exec_t in the gnome_remote_desktop domain. | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed to transition. | ||
## </summary> | ||
## </param> | ||
# | ||
interface(`gnome_remote_desktop_domtrans',` | ||
gen_require(` | ||
type gnome_remote_desktop_t, gnome_remote_desktop_exec_t; | ||
') | ||
|
||
corecmd_search_bin($1) | ||
domtrans_pattern($1, gnome_remote_desktop_exec_t, gnome_remote_desktop_t) | ||
') | ||
|
||
###################################### | ||
## <summary> | ||
## Execute gnome_remote_desktop in the caller domain. | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
# | ||
interface(`gnome_remote_desktop_exec',` | ||
gen_require(` | ||
type gnome_remote_desktop_exec_t; | ||
') | ||
|
||
corecmd_search_bin($1) | ||
can_exec($1, gnome_remote_desktop_exec_t) | ||
') | ||
|
||
######################################## | ||
## <summary> | ||
## Search gnome_remote_desktop lib directories. | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
# | ||
interface(`gnome_remote_desktop_search_lib',` | ||
gen_require(` | ||
type gnome_remote_desktop_var_lib_t; | ||
') | ||
|
||
allow $1 gnome_remote_desktop_var_lib_t:dir search_dir_perms; | ||
files_search_var_lib($1) | ||
') | ||
|
||
######################################## | ||
## <summary> | ||
## Read gnome_remote_desktop lib files. | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
# | ||
interface(`gnome_remote_desktop_read_lib_files',` | ||
gen_require(` | ||
type gnome_remote_desktop_var_lib_t; | ||
') | ||
|
||
files_search_var_lib($1) | ||
read_files_pattern($1, gnome_remote_desktop_var_lib_t, gnome_remote_desktop_var_lib_t) | ||
') | ||
|
||
######################################## | ||
## <summary> | ||
## Manage gnome_remote_desktop lib files. | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
# | ||
interface(`gnome_remote_desktop_manage_lib_files',` | ||
gen_require(` | ||
type gnome_remote_desktop_var_lib_t; | ||
') | ||
|
||
files_search_var_lib($1) | ||
manage_files_pattern($1, gnome_remote_desktop_var_lib_t, gnome_remote_desktop_var_lib_t) | ||
') | ||
|
||
######################################## | ||
## <summary> | ||
## Manage gnome_remote_desktop lib directories. | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
# | ||
interface(`gnome_remote_desktop_manage_lib_dirs',` | ||
gen_require(` | ||
type gnome_remote_desktop_var_lib_t; | ||
') | ||
|
||
files_search_var_lib($1) | ||
manage_dirs_pattern($1, gnome_remote_desktop_var_lib_t, gnome_remote_desktop_var_lib_t) | ||
') | ||
|
||
|
||
######################################## | ||
## <summary> | ||
## All of the rules required to administrate | ||
## an gnome_remote_desktop environment | ||
## </summary> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
## <param name="role"> | ||
## <summary> | ||
## Role allowed access. | ||
## </summary> | ||
## </param> | ||
## <rolecap/> | ||
# | ||
interface(`gnome_remote_desktop_admin',` | ||
gen_require(` | ||
type gnome_remote_desktop_t; | ||
type gnome_remote_desktop_var_lib_t; | ||
') | ||
|
||
allow $1 gnome_remote_desktop_t:process { signal_perms }; | ||
ps_process_pattern($1, gnome_remote_desktop_t) | ||
|
||
tunable_policy(`deny_ptrace',`',` | ||
allow $1 gnome_remote_desktop_t:process ptrace; | ||
') | ||
|
||
files_search_var_lib($1) | ||
admin_pattern($1, gnome_remote_desktop_var_lib_t) | ||
optional_policy(` | ||
systemd_passwd_agent_exec($1) | ||
systemd_read_fifo_file_passwd_run($1) | ||
') | ||
') | ||
|
||
## <summary> | ||
## Read and write to TCP socket | ||
## </summary> | ||
## <desc> | ||
## <p> | ||
## Allow the specified domain to read and write to | ||
## gnome_remote_desktop_port_t TCP socket | ||
## </p> | ||
## </desc> | ||
## <param name="domain"> | ||
## <summary> | ||
## Domain allowed access. | ||
## </summary> | ||
## </param> | ||
# | ||
interface(`gnome_remote_desktop_rw_tcp_sockets', ` | ||
gen_require(` | ||
type gnome_remote_desktop_t; | ||
') | ||
|
||
allow $1 gnome_remote_desktop_t:tcp_socket rw_socket_perms; | ||
') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
policy_module(gnome_remote_desktop, 1.0.0) | ||
|
||
######################################## | ||
# | ||
# Declarations | ||
# | ||
|
||
type gnome_remote_desktop_t; | ||
type gnome_remote_desktop_exec_t; | ||
domain_type(gnome_remote_desktop_t) | ||
domain_entry_file(gnome_remote_desktop_t, gnome_remote_desktop_exec_t) | ||
role system_r types gnome_remote_desktop_t; | ||
|
||
permissive gnome_remote_desktop_t; | ||
|
||
type gnome_remote_desktop_var_lib_t; | ||
files_type(gnome_remote_desktop_var_lib_t) | ||
|
||
######################################## | ||
# | ||
# gnome_remote_desktop local policy | ||
# | ||
|
||
kernel_dgram_send(gnome_remote_desktop_t) | ||
|
||
manage_dirs_pattern(gnome_remote_desktop_t, gnome_remote_desktop_var_lib_t, gnome_remote_desktop_var_lib_t) | ||
manage_files_pattern(gnome_remote_desktop_t, gnome_remote_desktop_var_lib_t, gnome_remote_desktop_var_lib_t) | ||
manage_lnk_files_pattern(gnome_remote_desktop_t, gnome_remote_desktop_var_lib_t, gnome_remote_desktop_var_lib_t) | ||
files_var_lib_filetrans(gnome_remote_desktop_t, gnome_remote_desktop_var_lib_t, { dir file lnk_file }) | ||
|
||
#============= gnome_remote_desktop_t ============== | ||
corenet_tcp_bind_gnome_remote_desktop_port(gnome_remote_desktop_t) | ||
allow gnome_remote_desktop_t self:tcp_socket create_stream_socket_perms; | ||
allow gnome_remote_desktop_t self:unix_dgram_socket create_socket_perms; | ||
|
||
domain_use_interactive_fds(gnome_remote_desktop_t) | ||
|
||
files_read_etc_files(gnome_remote_desktop_t) | ||
|
||
corenet_tcp_bind_generic_node(gnome_remote_desktop_t) | ||
dev_read_sysfs(gnome_remote_desktop_t) | ||
files_watch_usr_dirs(gnome_remote_desktop_t) | ||
fs_getattr_cgroup(gnome_remote_desktop_t) | ||
fs_getattr_xattr_fs(gnome_remote_desktop_t) | ||
init_read_state(gnome_remote_desktop_t) | ||
|
||
optional_policy(` | ||
dbus_system_domain(gnome_remote_desktop_t, gnome_remote_desktop_exec_t) | ||
') | ||
|
||
optional_policy(` | ||
kerberos_read_config(gnome_remote_desktop_t) | ||
') | ||
|
||
optional_policy(` | ||
logging_write_syslog_pid_socket(gnome_remote_desktop_t) | ||
') | ||
|
||
optional_policy(` | ||
miscfiles_read_certs(gnome_remote_desktop_t) | ||
miscfiles_read_localization(gnome_remote_desktop_t) | ||
') | ||
|
||
optional_policy(` | ||
systemd_login_list_pid_dirs(gnome_remote_desktop_t) | ||
systemd_login_read_pid_files(gnome_remote_desktop_t) | ||
systemd_read_logind_sessions_files(gnome_remote_desktop_t) | ||
') | ||
|
||
optional_policy(` | ||
xserver_dbus_chat_xdm(gnome_remote_desktop_t) | ||
xserver_read_xdm_state(gnome_remote_desktop_t) | ||
') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters