Skip to contentSkip to conversation

running programs

DISCUSSION Steve Eckmann 2 participants 3 messages Jul 21, 2001 – Jul 24, 2001 1 message not in the archive SELinux security module

lore
Share & tools
lore
#0 lore raw

When I enable MAC with avc_toggle I can no longer run "ping" either as root or as a regular user. Can anyone explain how to fix this? There's no avc "denied" message, but there is a message about not being able to open a socket (don't have an se-linux system at hand and can't remember the exact msg).

Also, the tara (aka tiger) security scanner won't run with MAC enabled. I'm guessing that I just have to change the SID on the tiger executable, but I'm not sure what it should be so sysadm users can run it but regular users cannot. Suggestions?

Thanks.

Steve

--
You have received this message because you are subscribed to the selinux 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 5 lines · Steve Eckmann

When I enable MAC with avc_toggle I can no longer run "ping" either as root or as a regular user. Can anyone explain how to fix this? There's no avc "denied" message, but there is a message about not being able to open a socket (don't have an se-linux system at hand and can't remember the exact msg).

You need to put ping into a domain that has permissions to rawip_socket. There should be avc denied messages - check dmesg and /var/log/messages to be sure.

Quoted 4 lines

Also, the tara (aka tiger) security scanner won't run with MAC enabled. I'm guessing that I just have to change the SID on the tiger executable, but I'm not sure what it should be so sysadm users can run it but regular users cannot. Suggestions?

What avc denied messages are you seeing when you try to run the security scanner? Why do you want to prevent ordinary users from executing it - can't they just download their own copy and run it if they want to do so? If you really want to prevent them from running it, you can either define a new type for that purpose or you can use sbin_t, remove sbin_t from can_exec_any in macros.te, and add sbin_t explicitly to the domains that require execute access to sbin programs. If you just want it to run unprivileged when executed by ordinary users, then you don't have to do anything - when it is run by ordinary users, it will run in the unprivileged user_t domain by default, whereas when it is run by administrators, it will run in the sysadm_t domain by default.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

A message that is not in the archive (sent off-list or not yet received): [email protected] s.com

#3 lore raw
Quoted 10 lines
Quoted 6 lines

When I enable MAC with avc_toggle I can no longer run "ping" either as root or as a regular user. Can anyone explain how to fix this? There's no avc "denied" message, but there is a message about not being able to open a socket (don't have an se-linux system at hand and can't remember the exact msg).

You need to put ping into a domain that has permissions to rawip_socket. There should be avc denied messages - check dmesg and /var/log/messages to be sure.

Yes, I hadn't looked for the avc denied message (I'm used to seeing them when I run at the console but did the "ping" test in an xterm), but it's there: create denied for rawip_socket.

Quoted 5 lines
Quoted 4 lines

Also, the tara (aka tiger) security scanner won't run with MAC enabled. I'm guessing that I just have to change the SID on the tiger executable, but I'm not sure what it should be so sysadm users can run it but regular users cannot. Suggestions?

Quoted 14 lines

What avc denied messages are you seeing when you try to run the security scanner? Why do you want to prevent ordinary users from executing it - can't they just download their own copy and run it if they want to do so? If you really want to prevent them from running it, you can either define a new type for that purpose or you can use sbin_t, remove sbin_t from can_exec_any in macros.te, and add sbin_t explicitly to the domains that require execute access to sbin programs. If you just want it to run unprivileged when executed by ordinary users, then you don't have to do anything - when it is run by ordinary users, it will run in the unprivileged user_t domain by default, whereas when it is run by administrators, it will run in the sysadm_t domain by default.

It's not that I need to prevent ordinary users from executing this particular program; I just thought that doing so would increase my understanding of selinux configuration. After I turn on security I can't execute tiger (a shell script) as root or as an ordinary user. I think the interesting parts of the avc denied message are:

{ execute }
exe=/bin/bash
path=/usr/local/src/tara-2.0.0/tiger
tclass=file

Thanks.

Steve

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.