selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove shell automatic domain transitions to unconfined_t from various pam login programs
@ 2019-09-01 12:46 Dominick Grift
  2019-09-04  7:25 ` Dominick Grift
  2019-09-07 20:27 ` Chris PeBenito
  0 siblings, 2 replies; 3+ messages in thread
From: Dominick Grift @ 2019-09-01 12:46 UTC (permalink / raw)
  To: selinux-refpolicy; +Cc: 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

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.

Signed-off-by: Dominick Grift <dac.override@gmail.com>
---
 policy/modules/services/remotelogin.te | 4 ----
 policy/modules/services/ssh.te         | 4 ----
 policy/modules/system/locallogin.te    | 4 ----
 3 files changed, 12 deletions(-)

diff --git a/policy/modules/services/remotelogin.te b/policy/modules/services/remotelogin.te
index bc2292e3..c7c9c564 100644
--- a/policy/modules/services/remotelogin.te
+++ b/policy/modules/services/remotelogin.te
@@ -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)
 ')
diff --git a/policy/modules/services/ssh.te b/policy/modules/services/ssh.te
index 4e75b6e1..a99ad912 100644
--- a/policy/modules/services/ssh.te
+++ b/policy/modules/services/ssh.te
@@ -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)
diff --git a/policy/modules/system/locallogin.te b/policy/modules/system/locallogin.te
index a56f3d1f..632d2542 100644
--- a/policy/modules/system/locallogin.te
+++ b/policy/modules/system/locallogin.te
@@ -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)
 ')
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Remove shell automatic domain transitions to unconfined_t from various pam login programs
  2019-09-01 12:46 [PATCH] Remove shell automatic domain transitions to unconfined_t from various pam login programs Dominick Grift
@ 2019-09-04  7:25 ` Dominick Grift
  2019-09-07 20:27 ` Chris PeBenito
  1 sibling, 0 replies; 3+ messages in thread
From: Dominick Grift @ 2019-09-04  7:25 UTC (permalink / raw)
  To: selinux-refpolicy

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

On Sun, Sep 01, 2019 at 02:46:20PM +0200, Dominick Grift wrote:
> I think these may have been adopted from the old Red Hat targeted policy (that model only had unconfined users)

Was this overlooked?

> 
> 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.
> 
> Signed-off-by: Dominick Grift <dac.override@gmail.com>
> ---
>  policy/modules/services/remotelogin.te | 4 ----
>  policy/modules/services/ssh.te         | 4 ----
>  policy/modules/system/locallogin.te    | 4 ----
>  3 files changed, 12 deletions(-)
> 
> diff --git a/policy/modules/services/remotelogin.te b/policy/modules/services/remotelogin.te
> index bc2292e3..c7c9c564 100644
> --- a/policy/modules/services/remotelogin.te
> +++ b/policy/modules/services/remotelogin.te
> @@ -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)
>  ')
> diff --git a/policy/modules/services/ssh.te b/policy/modules/services/ssh.te
> index 4e75b6e1..a99ad912 100644
> --- a/policy/modules/services/ssh.te
> +++ b/policy/modules/services/ssh.te
> @@ -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)
> diff --git a/policy/modules/system/locallogin.te b/policy/modules/system/locallogin.te
> index a56f3d1f..632d2542 100644
> --- a/policy/modules/system/locallogin.te
> +++ b/policy/modules/system/locallogin.te
> @@ -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)
>  ')
> -- 
> 2.23.0
> 

-- 
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Remove shell automatic domain transitions to unconfined_t from various pam login programs
  2019-09-01 12:46 [PATCH] Remove shell automatic domain transitions to unconfined_t from various pam login programs Dominick Grift
  2019-09-04  7:25 ` Dominick Grift
@ 2019-09-07 20:27 ` Chris PeBenito
  1 sibling, 0 replies; 3+ messages in thread
From: Chris PeBenito @ 2019-09-07 20:27 UTC (permalink / raw)
  To: Dominick Grift, selinux-refpolicy

On 9/1/19 8:46 AM, Dominick Grift wrote:
> 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.
> 
> Signed-off-by: Dominick Grift <dac.override@gmail.com>
> ---
>   policy/modules/services/remotelogin.te | 4 ----
>   policy/modules/services/ssh.te         | 4 ----
>   policy/modules/system/locallogin.te    | 4 ----
>   3 files changed, 12 deletions(-)

Merged.



> diff --git a/policy/modules/services/remotelogin.te b/policy/modules/services/remotelogin.te
> index bc2292e3..c7c9c564 100644
> --- a/policy/modules/services/remotelogin.te
> +++ b/policy/modules/services/remotelogin.te
> @@ -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)
>   ')
> diff --git a/policy/modules/services/ssh.te b/policy/modules/services/ssh.te
> index 4e75b6e1..a99ad912 100644
> --- a/policy/modules/services/ssh.te
> +++ b/policy/modules/services/ssh.te
> @@ -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)
> diff --git a/policy/modules/system/locallogin.te b/policy/modules/system/locallogin.te
> index a56f3d1f..632d2542 100644
> --- a/policy/modules/system/locallogin.te
> +++ b/policy/modules/system/locallogin.te
> @@ -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)
>   ')
> 


-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-07 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-01 12:46 [PATCH] Remove shell automatic domain transitions to unconfined_t from various pam login programs Dominick Grift
2019-09-04  7:25 ` Dominick Grift
2019-09-07 20:27 ` Chris PeBenito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).