All of lore.kernel.org
 help / color / mirror / Atom feed
* http process running as initrc_t
@ 2015-09-16 20:31 Divya Vyas
  2015-09-18 13:31 ` Miroslav Grepl
  0 siblings, 1 reply; 2+ messages in thread
From: Divya Vyas @ 2015-09-16 20:31 UTC (permalink / raw)
  To: selinux

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

Hi,

run_init /usr/sbin/httpd -k start

leads to
system_u:system_r:initrc_t:s0   root      3977     1  0 19:57 ?
00:00:00 /usr/sbin/httpd -k start

It should be httpd_t

sesearch -ACT -t httpd_exec_t has the transition
type_transition initrc_t httpd_exec_t : process httpd_t;

[-- Attachment #2: Type: text/html, Size: 380 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: http process running as initrc_t
  2015-09-16 20:31 http process running as initrc_t Divya Vyas
@ 2015-09-18 13:31 ` Miroslav Grepl
  0 siblings, 0 replies; 2+ messages in thread
From: Miroslav Grepl @ 2015-09-18 13:31 UTC (permalink / raw)
  To: Divya Vyas, selinux

On 09/16/2015 10:31 PM, Divya Vyas wrote:
> Hi,
> 
> run_init /usr/sbin/httpd -k start
> 
> leads to
> system_u:system_r:initrc_t:s0   root      3977     1  0 19:57 ?       
> 00:00:00 /usr/sbin/httpd -k start


Which is correct. run_init runs a script with a context defined in
/etc/selinux/POLICYTYPE/contexts/initrc_context. So if you run it
directly this way, you get httpd_t running as initrc_t according to
/etc/selinux/POLICYTYPE/contexts/initrc_context.

You should run it using a service script to make sure all proper
transitions will happen.


> 
> It should be httpd_t
> 
> sesearch -ACT -t httpd_exec_t has the transition
> type_transition initrc_t httpd_exec_t : process httpd_t;
> 
> 
> 
> 
> _______________________________________________
> Selinux mailing list
> Selinux@tycho.nsa.gov
> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
> 


-- 
Miroslav Grepl
Senior Software Engineer, SELinux Solutions
Red Hat, Inc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-18 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 20:31 http process running as initrc_t Divya Vyas
2015-09-18 13:31 ` Miroslav Grepl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.