Skip to contentSkip to conversation

route

DISCUSSION Carsten Grohmann 3 participants 6 messages Sep 4, 2002 – Sep 6, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi!

attached is the rule set for the route_t domain. I am glad if anybody use it.

Carsten

#
# This policy is for route
#
# Author : Carsten Grohmann <[email protected]>
#
# $Id$
#
# License : GPL
#
# Last change: 04. September 2002
#
# State : complete and testet
#
# Tested versions:
# - SuSE 7.3
#
# Hints :
# -
#
# Changes :
# -
#
# Enhancements/Corrections:
# -

# General declarations
######################

type route_t, domain;
role system_r types route_t;
role sysadm_r types route_t;

# type for the route executable
type route_exec_t, file_type, sysadmfile, exec_type;
# type for route configuration file ( /etc/route.conf )
type etc_route_t, file_type, sysadmfile;
file_type_auto_trans(route_t, etc_t, etc_route_t)

domain_auto_trans(initrc_t, route_exec_t, route_t) type_transition init_t route_exec_t:process route_t;

domain_auto_trans(sysadm_t, route_exec_t, route_t)

# File permissions
##################

# Allow access to proc_t
allow route_t proc_t:dir { search }; allow route_t proc_t:file { getattr read };

# Allow access to sysadm_tty_device_t
allow route_t sysadm_tty_device_t:chr_file { getattr ioctl read write };

# Process permissions
#####################

# Allow to use shared libraries
uses_shlib(route_t)

allow route_t self:capability { net_admin };

# Allow process and network communication
#########################################

allow route_t local_login_t:fd { use }; allow route_t self:udp_socket { create ioctl };

# Settings to allow initrc_t access to etc_route_t ifdef(initrc.te', allow initrc_t etc_route_t:file { ioctl read }; ')

#
# Author: Carsten Grohmann <[email protected]> #
# $Id$
#

# settings for route
####################

/sbin/route system_u:object_r:route_exec_t
/etc/route.conf system_u:object_r:etc_route_t

#1 lore raw
Quoted 2 lines · Carsten Grohmann

attached is the rule set for the route_t domain.
I am glad if anybody use it.

What problem does this solve? Why is it that route can't just be run in the context of the program that called it?

The kernel source comments suggest that net_admin capability is needed for changing routes, but sysadm_t doesn't have that and can still change routes. It seems that you're not giving route_t any other access than net_admin...

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
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

Am Donnerstag, 5. September 2002 14:47 schrieb Russell Coker:

Quoted 6 lines · Carsten Grohmann
Quoted 2 lines

attached is the rule set for the route_t domain.
I am glad if anybody use it.

What problem does this solve? Why is it that route can't just be run in the context of the program that called it?

I use it in the rules for the ipppd_t domain. Through ipppd_t don't need access to execute all sbin_t programms.
Or do you think this is not neseccary?

--
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.

#3 lore raw
Quoted 11 lines · Carsten Grohmann

Am Donnerstag, 5. September 2002 14:47 schrieb Russell Coker:

Quoted 6 lines · Carsten Grohmann
Quoted 2 lines

attached is the rule set for the route_t domain.
I am glad if anybody use it.

What problem does this solve? Why is it that route can't just be run in the context of the program that called it?

I use it in the rules for the ipppd_t domain. Through ipppd_t don't need access to execute all sbin_t programms.
Or do you think this is not neseccary?

Why do you need a separate ipppd_t domain? Surely the best thing would be to just give pppd_t access to the ISDN devices...

pppd_t can execute sbin_t binaries, this is needed for ip-up scripts...

I think it would be a better solution to have ipppd run in the pppd_t domain and to allow it to run /sbin/route in the pppd_t domain as well.

One problem with creating lots of domains is that it makes the policy more complex, more difficult to audit, and more difficult for new users to manage (which will decrease the popularity of SE Linux). I try and avoid creating a new domain unless there is a clear well defined security benefit.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
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.

#4 lore raw

Kernel panic: VFS: Unable to mount root fs

hey,
i'm pretty new at this, but i can not get selinux 2.4 to load on a fresh install of redhat 7.3. are there any special configs that need to be done(since the README file is for 7.1 and 7.2)

i keep getting this error:

VFS: Cannot open root device "sda2" or 08:02
Please append a correct "root= " boot option

Kernel panic: VFS: Unable to mount root fs on 08:02

has anyone seen this before? i've tried adding "mem=96M" after the boot option, but still hangs at this error.
any help would be greatly appreciated.

thanks,
ryan

--
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.

#5 lore raw

Kernel panic: VFS: Unable to mount root fs

In reply to Russell Coker

hey,
i'm pretty new at this, but i can not get selinux 2.4 to load on a fresh install of redhat 7.3. are there any special configs that need to be done(since the README file is for 7.1 and 7.2)

i keep getting this error:

VFS: Cannot open root device "sda2" or 08:02
Please append a correct "root= " boot option

Kernel panic: VFS: Unable to mount root fs on 08:02

has anyone seen this before? i've tried adding "mem=96M" after the boot option, but still hangs at this error.
any help would be greatly appreciated.

thanks,
ryan

--
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.