Skip to contentSkip to conversation

Display all processes using ps

DISCUSSION Guido Trentalancia 3 participants 3 messages Jun 13, 2010 – Jun 15, 2010 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hello everybody !

I am logging as root on a remote MLS machine using ssh so the default role is staff_r. However, I need to execute ps (to display all system processes, "ps -ax") over ssh. Unfortunately, ps does not show all processes that are normally displayed when using the sysadm_r role because it runs in the staff_r role.

What would be the safest way to allow ps over ssh to show all processes running on the system ?

Thanks for your help.

Guido

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 10 lines · Guido Trentalancia

Hello everybody !

I am logging as root on a remote MLS machine using ssh so the default role is staff_r. However, I need to execute ps (to display all system processes, "ps -ax") over ssh. Unfortunately, ps does not show all processes that are normally displayed when using the sysadm_r role because it runs in the staff_r role.

What would be the safest way to allow ps over ssh to show all processes running on the system ?

login using the sysadm_t domain? ssh root/sysadm_r@localhost

Quoted 10 lines

Thanks for your help.

Guido

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
In reply to Guido Trentalancia
Quoted 13 lines · Guido Trentalancia

Hello everybody !

I am logging as root on a remote MLS machine using ssh so the default role is staff_r. However, I need to execute ps (to display all system processes, "ps -ax") over ssh. Unfortunately, ps does not show all processes that are normally displayed when using the sysadm_r role because it runs in the staff_r role.

What would be the safest way to allow ps over ssh to show all processes running on the system ?

Thanks for your help.

Quoted 7 lines

Guido

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

If you want to allow staff this, you need to add

mls_file_read_to_clearance(staff_t)

And make sure staff_t has SystemLow-SystemHigh

Or if you want to be more specific you could add a new constraint, like the one in MCS

mlsconstrain file { read ioctl lock execute execute_no_trans }

	(( h1 dom h2 ) or ( t1 == mcsreadall ) or ( t2 == domain ));

And then allow staff_t to read all process files but no others.

Or turn on the

ssh_sysadm_login boolean
and log in

ssh dwalsh/sysadm_r@remotehost

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.