Skip to contentSkip to conversation

transition denied

DISCUSSION Milus János 2 participants 2 messages Jan 9, 2005 – Jan 12, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hello

I'm newbie in SeLinux and I have a problem. I made a jail (a chroo environment) for a game server. My plan was it will run on games:games_r:games_t security context in a following way:

(1) the rc script makes a chroot and calls the "su" program inside the jail to become "games" user and change the security context from system_u:system_r:initrc_t to system_u:games_r:games_su_t

(2) then the su calls the program itself who changes the domain from games_su_t to games_t.

My problem is the first step. I always get the following error message:

avc: denied { transition } for pid=16335 exe=/bin/chroot path=/bin/su dev=md2 ino=426102 scontext=system_u:system_r:initrc_t tcontext=system_u:games_r:games_su_t tclass=process

My games.te file:
#################################
#
# Rules for the games_t domain.
#
type games_t, domain;
type games_su_t, domain, privrole, privuser, privowner, privfd; role games_r types games_t;
role games_r types games_su_t;
type games_exec_t, file_type, exec_type;
type games_su_exec_t, file_type, exec_type;

allow system_r games_r;
role_transition system_r games_su_exec_t games_r; domain_auto_trans(initrc_t, games_su_exec_t, games_su_t)

domain_auto_trans(games_su_t, games_exec_t, games_t)

can_network(games_t)
##########

I modified the user file:

user system_u roles { system_r games_r }

And I added the privovner and privrole attribute to initrc_t domain. (but I'm not absolutly sure, that this is necessary)

What am I miss?

Signature · 8 lines
Üdv:
Jo-Hans


--
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 8 lines · Milus János

I modified the user file:

user system_u roles { system_r games_r }

And I added the privovner and privrole attribute to initrc_t domain. (but I'm not absolutly sure, that this is necessary)

What am I miss?

privuser, not privowner. privuser == ability to transition to other user identities, privowner == ability to create/relabel files with other user identities. Also, games_t needs the userdomain attribute as well as the domain attribute in order to satisfy the constraint.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


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