All of lore.kernel.org
 help / color / mirror / Atom feed
* How to write a policy for a "service wrapper"?
@ 2024-11-11 16:14 Ian Pilcher
  2024-11-11 18:33 ` Dominick Grift
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Pilcher @ 2024-11-11 16:14 UTC (permalink / raw)
  To: SElinux list

I have a service (stunnel) that runs in a confined domain (stunnel_t).

Due to changes in Fedora's systemwide cryptographic policy, I need to
run this service under the "legacy" cryptographic policy, using the
'runcp' wrapper[1].

So my idea is to create new domain for the wrapper (runcp_t or similar),
give that domain the permissions required to perform its functions, and
then use a type transition rule to run the actual service in its normal
domain.

It's simple enough to write a type transition rule for a specific
service, e.g.:

   type_transition runcp_t stunnel_exec_t:process stunnel_t;

However, it would obviously be nice to allow the wrapper to be used
without the need for service-specific rules.

Any service that normally runs in a confined domain presumably already
provides a type transition rule for the init system, e.g.:

   type_transition init_t stunnel_exec_t:process stunnel_t;

Is there some way that I can make the wrapper take advantage of these
rules, possibly by transitioning back to init_t?

[1] 
https://gitlab.com/redhat-crypto/crypto-policies-extras/-/blob/main/runcp.c

-- 
========================================================================
If your user interface is intuitive in retrospect ... it isn't intuitive
========================================================================


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

end of thread, other threads:[~2024-11-11 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 16:14 How to write a policy for a "service wrapper"? Ian Pilcher
2024-11-11 18:33 ` Dominick Grift
2024-11-11 18:37   ` Ian Pilcher

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.