• 1
This is really good stuff... looking forward to the next installment.

You may want to emphasize whether "So if you want to run a targeted domain under the locked down context, you need to use the init scripts." is only applicable under the TARGETED POLICY or also under strict, etc.

[quote]The init process then runs /etc/rc.d/rc.sysinit which is labeled initrc_exec_t. The kernel has a rule that says when init_r execs initrc_exec_t it transitions to initrc_t. So this continues until the httpd executable gets started as httpd_t.[/quote]

shouldn't the init_r here really mean init_t according to what you said above?

So when I log in to the system. pam users libselinux to figure out what is the initial context setup for username dwalsh?

that's another little mistake, 'pam uses libselinux to ...'.
but this is a wonderful article.
i wish you have more time to write more wonderful articles.
thanks dan walsh!

problem with unconfined_t

Hi thanks for nice article.

I have written a program which access a file;and i have given a context system_u:object_r:app_exec_t. Domain is app_t.


But no where permission give to unconfined_t, to execute the program with context app_exec_t.

Now if i run a program in root (unconfined_u:unconfined_r:unconfined_t) its getting executed;and i checked context
ps -axZ | grep app its running with context
unconfined_u:unconfined_r:unconfined_t


Here why selinux is not blocking unconfned_t to execute app.

Please give me some idea to block this unconfined_t.


Thanks


Re: problem with unconfined_t

unconfined_t means an unconfined process. IE It can do anything it wants, just like SELinux is disabled.

unconfined is allowed to execute any file_type, (app_exec_t) within it's own domain.

If you want to confine a user, you need to use confined users like staff_t and user_t.

Re: problem with unconfined_t

Hi
Thank you very much.Now i am trying with user_t but selinux is blocking some application, which i need. Now i explicitly have to give all permission ...


Thank for the support

Shrikanta

Re: problem with unconfined_t

Hi
I am using redhat 5 in that i did not find staff_t or user_t;by default its showing only unconfined_t type. Do i need download some rpm which gives staff_t or user_t ? or redhat will not support these type?.
Fedora all these types are by default, my code is working fine there.

Thank you

Re: problem with unconfined_t

staff_t and user_t are defined in strict policy in RHEL5. In RHEL6 they will be in the standard policy.

You could install selinux-policy-strict and switch to strict policy but you had better know what you are doing, since you will loose the unconfined_t domain.

Re: problem with unconfined_t

Many thanks for your kind support.

trying to add new user in RHEL 5.4

Hi,
As there is no user_t type in RHEL5 i am trying to add new user. I generated new user(myuser_t and myuser_r) using polygen tool and loaded into RHEL5.4; later i added myuser_r:myuser_t in default_type file.
Also mapped a normal user to myuser_u, and relabeled home dirs....
and created a file mysuer_u inside /etc/selinux/targeted/contexts/users
and mapped
system_r:local_login_t:s0 myuser_r:myuser_t:s0
system_r:xdm_t:s0 myuser_r:myuser_t:s0
system_r:updpwd_t:s0 myuser_r:myuser_t:s0

and in /pam.d/login
session required pam_selinux.so open selet_context

But when i logged in permissive mode id -Z gives
myuser_u:myuser_r:updpwd_t
in enforce mode login is not possible.
Am i missing out something? Please give me some idea.

Thanks and regards
shrikanta


Re: trying to add new user in RHEL 5.4

You need to add a transition rule from local_login_t and xdm_t to myuser_t and you need to allow system_r to transition to myuser_r.


Doing this with RHEL6 will be a lot easier.

Re: trying to add new user in RHEL 5.4

Look as userdomain.if

  • 1
?

Log in