Skip to contentSkip to conversation

Remove shell automatic domain transitions to unconfined_t from various pam login programs

PATCH In review Dominick Grift 2 participants 3 messages Sep 1, 2019 – Sep 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove shell automatic domain transitions to unconfined_t from various pam login programs

I think these may have been adopted from the old Red Hat targeted policy (that model only had unconfined users)

Some aspect to note:

1. The ssh_sysadm_login boolean now applies to unconfined_t as well
2. remotelogin only allows unpriv logins

The rshd module also calls unconfined_shell_domtrans() but I ignored that one because that policy currently does not have support for manual transitions with pam_selinux.

---
 policy/modules/services/remotelogin.te | 4 ----
 policy/modules/services/ssh.te         | 4 ----
 policy/modules/system/locallogin.te    | 4 ----
 3 files changed, 12 deletions(-)
policy/modules/services/remotelogin.te +0 -4
index bc2292e3..c7c9c564 100644
@@ -91,10 +91,6 @@ optional_policy(`
 	telnet_use_ptys(remote_login_t)
 ')
 
-optional_policy(`
-	unconfined_shell_domtrans(remote_login_t)
-')
-
 optional_policy(`
 	usermanage_read_crack_db(remote_login_t)
 ')
policy/modules/services/ssh.te +0 -4
index 4e75b6e1..a99ad912 100644
@@ -328,10 +328,6 @@ optional_policy(`
 	systemd_dbus_chat_logind(sshd_t)
 ')
 
-optional_policy(`
-	unconfined_shell_domtrans(sshd_t)
-')
-
 optional_policy(`
 	xserver_domtrans_xauth(sshd_t)
 	xserver_link_xdm_keys(sshd_t)
policy/modules/system/locallogin.te +0 -4
index a56f3d1f..632d2542 100644
@@ -200,10 +200,6 @@ optional_policy(`
 	systemd_write_inherited_logind_sessions_pipes(local_login_t)
 ')
 
-optional_policy(`
-	unconfined_shell_domtrans(local_login_t)
-')
-
 optional_policy(`
 	usermanage_read_crack_db(local_login_t)
 ')
Signature · 1 line
2.23.0
#1 lore raw
Quoted 1 line · Dominick Grift

I think these may have been adopted from the old Red Hat targeted policy (that model only had unconfined users)

Was this overlooked?

Quoted 63 lines

Some aspect to note:

1. The ssh_sysadm_login boolean now applies to unconfined_t as well
2. remotelogin only allows unpriv logins

The rshd module also calls unconfined_shell_domtrans() but I ignored that one because that policy currently does not have support for manual transitions with pam_selinux.

---
 policy/modules/services/remotelogin.te | 4 ----
 policy/modules/services/ssh.te         | 4 ----
 policy/modules/system/locallogin.te    | 4 ----
 3 files changed, 12 deletions(-)
policy/modules/services/remotelogin.te +0 -4
index bc2292e3..c7c9c564 100644
@@ -91,10 +91,6 @@ optional_policy(`
 	telnet_use_ptys(remote_login_t)
 ')
 
-optional_policy(`
-	unconfined_shell_domtrans(remote_login_t)
-')
-
 optional_policy(`
 	usermanage_read_crack_db(remote_login_t)
 ')
policy/modules/services/ssh.te +0 -4
index 4e75b6e1..a99ad912 100644
@@ -328,10 +328,6 @@ optional_policy(`
 	systemd_dbus_chat_logind(sshd_t)
 ')
 
-optional_policy(`
-	unconfined_shell_domtrans(sshd_t)
-')
-
 optional_policy(`
 	xserver_domtrans_xauth(sshd_t)
 	xserver_link_xdm_keys(sshd_t)
policy/modules/system/locallogin.te +0 -4
index a56f3d1f..632d2542 100644
@@ -200,10 +200,6 @@ optional_policy(`
 	systemd_write_inherited_logind_sessions_pipes(local_login_t)
 ')
 
-optional_policy(`
-	unconfined_shell_domtrans(local_login_t)
-')
-
 optional_policy(`
 	usermanage_read_crack_db(local_login_t)
 ')
Signature · 1 line
2.23.0
Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
#2 lore raw
In reply to Dominick Grift
Quoted 7 lines · Dominick Grift

I think these may have been adopted from the old Red Hat targeted policy (that model only had unconfined users)

Some aspect to note:

1. The ssh_sysadm_login boolean now applies to unconfined_t as well
2. remotelogin only allows unpriv logins

Quoted 8 lines

The rshd module also calls unconfined_shell_domtrans() but I ignored that one because that policy currently does not have support for manual transitions with pam_selinux.

---
  policy/modules/services/remotelogin.te | 4 ----
  policy/modules/services/ssh.te         | 4 ----
  policy/modules/system/locallogin.te    | 4 ----
  3 files changed, 12 deletions(-)

Merged.

Quoted 46 lines
policy/modules/services/remotelogin.te +0 -4
index bc2292e3..c7c9c564 100644
@@ -91,10 +91,6 @@ optional_policy(`
  	telnet_use_ptys(remote_login_t)
  ')
 
-optional_policy(`
-	unconfined_shell_domtrans(remote_login_t)
-')
-
  optional_policy(`
  	usermanage_read_crack_db(remote_login_t)
  ')
policy/modules/services/ssh.te +0 -4
index 4e75b6e1..a99ad912 100644
@@ -328,10 +328,6 @@ optional_policy(`
  	systemd_dbus_chat_logind(sshd_t)
  ')
 
-optional_policy(`
-	unconfined_shell_domtrans(sshd_t)
-')
-
  optional_policy(`
  	xserver_domtrans_xauth(sshd_t)
  	xserver_link_xdm_keys(sshd_t)
policy/modules/system/locallogin.te +0 -4
index a56f3d1f..632d2542 100644
@@ -200,10 +200,6 @@ optional_policy(`
  	systemd_write_inherited_logind_sessions_pipes(local_login_t)
  ')
 
-optional_policy(`
-	unconfined_shell_domtrans(local_login_t)
-')
-
  optional_policy(`
  	usermanage_read_crack_db(local_login_t)
  ')
Signature · 1 line
Chris PeBenito