From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] Single init script for multiple daemons
Date: Tue, 20 May 2014 09:24:28 -0400 [thread overview]
Message-ID: <537B578C.2070909@tresys.com> (raw)
In-Reply-To: <1400413033.4570.36.camel@vaio-emefes-com>
On 05/18/2014 07:37 AM, Mladen Sekara wrote:
> Thanks Dominick.
>
> Could you please elaborate a bit further on use of init_script_domain.
>
> I had a look at hadoop policy module, but it seems haddop has multiple
> init scripts for different daemons (don't know much about hadoop and
> it's internals though). It has a reference to init_script_domain() in
> interface file, but with my SELinux experience, I couldn't make much
> sense of it.
>
> In my case I have a single init script starting multiple daemons:
>
> /etc/init.d/start_all (myapp_initrc_exec_t) -> /opt/myapp/start_all
> /opt/myapp/bin/daemon1 (domain1_exec_t)
> /opt/myapp/bin/daemon2 (domain_exec_t)
>
> So, just to clarify, in this case I would have:
>
> init_script_domain(daemon1_t, daemon1_exec_t)... ???
> init_script_domain(daemon2_t, daemon2_exec_t)... ???
>
> or
> init_daemon_domain(daemon1_t, daemon1_exec_t)
> init_daemon_domain(daemon2_t, daemon2_exec_t)
If your init script simply starts/stops your daemons, you probably don't need a new type for your init script (no need for init_script_domain()). Since you want your two daemons to start up in separate domains, then you would use init_daemon_domain(), i.e. the second option above. Then the private resources would be daemon1_*_t and daemon2_*_t and the shared resources would have their own type(s).
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2014-05-20 13:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 4:16 [refpolicy] Single init script for multiple daemons Mladen Sekara
2014-05-16 12:09 ` Dominick Grift
2014-05-18 11:37 ` Mladen Sekara
2014-05-20 13:24 ` Christopher J. PeBenito [this message]
2014-05-21 14:13 ` Mladen Sekara
2014-05-21 16:16 ` Christopher J. PeBenito
2014-05-25 4:11 ` Mladen Sekara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=537B578C.2070909@tresys.com \
--to=cpebenito@tresys.com \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.