Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions policy/modules/services/xserver.te
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,23 @@ optional_policy(`
')

optional_policy(`
init_dbus_chat(xdm_t)
')

optional_policy(`
auth_provide_userdb(xdm_t)
auth_use_pam_systemd(xdm_t)
systemd_dbus_chat_hostnamed(xdm_t)
systemd_read_logind_runtime_files(xdm_t)
systemd_read_logind_sessions_files(xdm_t)
systemd_read_user_runtime_units_files(xdm_t)
systemd_search_user_runtime(xdm_t)
systemd_write_user_runtime_socket(xdm_t)
systemd_connectto_logind(xdm_t)
systemd_link_all_user_keys(xdm_t)
systemd_search_all_user_keys(xdm_t)
systemd_watch_logind_sessions_dirs(xdm_t)
systemd_write_inherited_logind_inhibit_pipes(xdm_t)
')
')

Expand Down
24 changes: 24 additions & 0 deletions policy/modules/system/authlogin.if
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,30 @@ interface(`auth_use_nsswitch',`
typeattribute $1 nsswitch_domain;
')

########################################
## <summary>
## Provide userdb data via /run/systemd/userdb sock file
## </summary>
## <desc>
## <p>
## Allow the specified domain to provide userdb data
## </p>
## </desc>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <infoflow type="both" weight="10"/>
#
interface(`auth_provide_userdb',`
gen_require(`
attribute userdb_server;
')

typeattribute $1 userdb_server;
')

########################################
## <summary>
## Unconfined access to the authlogin module.
Expand Down
2 changes: 2 additions & 0 deletions policy/modules/system/authlogin.te
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ attribute can_write_shadow_passwords;
attribute can_relabelto_shadow_passwords;
attribute nsswitch_domain;
attribute pam_domain;
attribute userdb_server;

type auth_cache_t;
logging_log_file(auth_cache_t)
Expand Down Expand Up @@ -495,6 +496,7 @@ ifdef(`init_systemd', `
systemd_stream_connect_userdb(nsswitch_domain)
systemd_stream_connect_homed(nsswitch_domain)
systemd_stream_connect_nsresourced(nsswitch_domain)
allow nsswitch_domain userdb_server:unix_stream_socket connectto;
')

optional_policy(`
Expand Down
37 changes: 37 additions & 0 deletions policy/modules/system/systemd.if
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,25 @@ interface(`systemd_use_logind_fds',`
allow $1 systemd_logind_t:fd use;
')

######################################
## <summary>
## Connect to systemd-logind via unix sockets
## for /run/systemd/io.systemd.Login
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`systemd_connectto_logind',`
gen_require(`
type systemd_logind_t;
')

allow $1 systemd_logind_t:unix_stream_socket connectto;
')

######################################
## <summary>
## Watch logind sessions dirs.
Expand Down Expand Up @@ -3022,6 +3041,24 @@ interface(`systemd_write_all_user_keys',`
allow $1 systemd_user_session_type:key write;
')

########################################
## <summary>
## link keys for the all systemd --user domains.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`systemd_link_all_user_keys',`
gen_require(`
attribute systemd_user_session_type;
')

allow $1 systemd_user_session_type:key link;
')

########################################
## <summary>
## signal all systemd --user domains.
Expand Down
2 changes: 2 additions & 0 deletions policy/modules/system/systemd.te
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,8 @@ kernel_read_system_state(systemd_machined_t)
dev_getattr_fs(systemd_machined_t)
dev_setattr_urand_dev(systemd_machined_t)

auth_provide_userdb(systemd_machined_t)

files_read_etc_files(systemd_machined_t)
files_read_etc_runtime_files(systemd_machined_t)

Expand Down
Loading