Skip to content

Commit

Permalink
Please create a new interface and use it here, no declaration of type…
Browse files Browse the repository at this point in the history
…s from outside this module would be needed then.
  • Loading branch information
bachradsusi committed Sep 9, 2024
1 parent d329ec7 commit d95dd09
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
5 changes: 1 addition & 4 deletions policy/modules/contrib/dbus.te
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,5 @@ kernel_stream_connect(session_bus_type)
systemd_login_read_pid_files(session_bus_type)

optional_policy(`
gen_require(`
type gnome_remote_desktop_t;
')
allow system_dbusd_t gnome_remote_desktop_t:tcp_socket { read write };
gnome_remote_desktop_rw_tcp_sockets(system_dbusd_t)
')
23 changes: 23 additions & 0 deletions policy/modules/contrib/gnome_remote_desktop.if
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,26 @@ interface(`gnome_remote_desktop_admin',`
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;
')
6 changes: 1 addition & 5 deletions policy/modules/services/xserver.te
Original file line number Diff line number Diff line change
Expand Up @@ -1860,10 +1860,6 @@ tunable_policy(`selinuxuser_direct_dri_enabled',`

#============= xdm_t ==============
optional_policy(`
require {
type gnome_remote_desktop_t;
}

allow xdm_t gnome_remote_desktop_t:tcp_socket { getattr getopt read setopt shutdown write };
gnome_remote_desktop_rw_tcp_sockets(xdm_t)
dev_rw_dma_dev(xdm_t)
')

0 comments on commit d95dd09

Please sign in to comment.