Skip to contentSkip to conversation

run_init

DISCUSSION Carsten Grohmann 3 participants 3 messages Jul 27, 2002 – Jul 29, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi!

The run_init program on my SuSE need follow rule
allow run_init_t initrc_exec_t:file { execute };
to correct.
I think it should need this rule. After this I read rule set and found this
# Execute the init scripts
domain_auto_trans(run_init_t, etc_t, initrc_t)

Now my question:
The init scripts are labled with initrc_exec_t and so etc_t should be initrc_exec_t to run correct. Or?

Thanks

Carsten

--
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 11 lines · Carsten Grohmann

The run_init program on my SuSE need follow rule
allow run_init_t initrc_exec_t:file { execute };
to correct.
I think it should need this rule. After this I read rule set and found this
# Execute the init scripts
domain_auto_trans(run_init_t, etc_t, initrc_t)

Now my question:
The init scripts are labled with initrc_exec_t and so etc_t should be initrc_exec_t to run correct. Or?

run_init is designed to run scripts such as /etc/init.d/ssh (or /etc/rc.d/init.d/ssh for some Red Hat based distributions). Such scripts should be labeled etc_t.

So you want something like the following in a file_contexts file:
/etc/rc.d/init.d(|/.*) system_u:object_r:etc_t

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.

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

#2 lore raw
In reply to Carsten Grohmann
Quoted 11 lines · Carsten Grohmann

The run_init program on my SuSE need follow rule
allow run_init_t initrc_exec_t:file { execute };
to correct.
I think it should need this rule. After this I read rule set and found this
# Execute the init scripts
domain_auto_trans(run_init_t, etc_t, initrc_t)

Now my question:
The init scripts are labled with initrc_exec_t and so etc_t should be initrc_exec_t to run correct. Or?

Only rc scripts that are run directly by init_t need to be labeled with initrc_exec_t so that init_t will transition to initrc_t. The individual program scripts under /etc/init.d (or /etc/rc.d/init.d) are typically left in etc_t, since they have no specific entry in file_contexts. The policy/file_contexts/program/initrc.fc file only assigns initrc_exec_t to the /etc/rc.d/rc.* scripts. There is also an entry for /etc/init.d/rc.*, presumably for some other distribution.

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