Skip to contentSkip to conversation

idea for run_init

DISCUSSION Russell Coker 2 participants 2 messages Apr 16, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Currently I have a need for run_init type functionality with three different SIDs for apt-get, dselect, and dpkg for Debian packaging.

I currently have my own program in my "selinux" Debian packages to change SID in addition to the regular run_init program.

My program expects it's argv[0] to be "se_%s" where the %s is the name of the program to run, then after authentication it will run the program %s with the SID expressed in /etc/security/%s_context.

So for example "se_apt-get install dpkg" will get the same result as "apt-get install dpkg" would on a non-SE system, and it will be run under the SID specified in /etc/security/apt-get_context, which is system_u:system_r:apt_t.

What do you think of this so far?

I could merge the functionality of my program into run_init, is this a good idea?

Signature · 9 lines
If you send email to me or to a mailing list that I use which has >4 lines
of legalistic junk at the end then you are specifically authorizing me to do
whatever I wish with the message and all other messages from your domain, by
posting the message you agree that your long legalistic sig is void.

--
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 15 lines · Russell Coker

Currently I have a need for run_init type functionality with three different SIDs for apt-get, dselect, and dpkg for Debian packaging.

I currently have my own program in my "selinux" Debian packages to change SID in addition to the regular run_init program.

My program expects it's argv[0] to be "se_%s" where the %s is the name of the program to run, then after authentication it will run the program %s with the SID expressed in /etc/security/%s_context.

So for example "se_apt-get install dpkg" will get the same result as "apt-get install dpkg" would on a non-SE system, and it will be run under the SID specified in /etc/security/apt-get_context, which is system_u:system_r:apt_t.

Quoted 4 lines

What do you think of this so far?

I could merge the functionality of my program into run_init, is this a good idea?

Perhaps the program could automatically derive the new context without needing a per-application configuration file (or even a per-application entry in a single configuration file). This would require some knowledge of the context internals. The only difference among these applications is the domain, which could be obtained from the security server via security_transition_sid -> sid_to_context -> context_new -> context_type_get.

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