All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Sekidde <ssekidde@redhat.com>
To: Ian Pilcher <arequipeno@gmail.com>
Cc: Systemd <systemd-devel@lists.freedesktop.org>,
	selinux@tycho.nsa.gov, lennart@poettering.net
Subject: Re: [systemd-devel] SELinux type transition rule not working
Date: Fri, 3 Mar 2017 11:01:59 -0500 (EST)	[thread overview]
Message-ID: <333322329.27680470.1488556919299.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <3cf89bd9-7f2b-81d0-c531-db6890cc2fee@gmail.com>



----- Original Message -----
> From: "Ian Pilcher" <arequipeno@gmail.com>
> To: "Simon Sekidde" <ssekidde@redhat.com>
> Cc: "Systemd" <systemd-devel@lists.freedesktop.org>, selinux@tycho.nsa.gov, lennart@poettering.net
> Sent: Friday, March 3, 2017 10:44:18 AM
> Subject: Re: [systemd-devel] SELinux type transition rule not working
> 
> On 03/02/2017 09:13 AM, Simon Sekidde wrote:
> > I assume this would be a pid file?
> 
> You assume correctly.
> 
> > If so then what you are probably looking for is a filename_trans rule
> > and will require a new interface in squid.if for this.
> >
> > Try something like
> >
> > interface(`squid_filetrans_named_content',` gen_require(`
> > type_squid_var_run_t; ')
> >
> > files_pid_filetrans($1, squid_var_run_t, dir, "squozy") ')
> 
> Not sure where squid came from.  The service is one of my own making
> called "squoxy" (short for "Squeezebox proxy").  Its purpose is to
> forward Squeezebox discovery broadcast packets from one network to
> another.
> 

Sorry I must have been doing something in the squid policy while I was responding to this... 

> So I assume that I would need to add something like this to my policy
> module:
> 
>    files_pid_filetrans(var_run_t, squoxy_var_run_t, dir, "squoxy")
> 
> (I'm guessing at what to put in for $1.)
> 

files_pid_filetrans(squoxy_t, squoxy_var_run_t, dir, "squoxy") 

Files created by the squoxy_t processes in the var_run_t directory will be created with the squoxy_var_run_t label

> >> Hmm, so the relevant code in systemd actually labels the dir after
> >> creating it after an selinux database lookup, so from our side all
> >> should be good:
> >>
> >> https://github.com/systemd/systemd/blob/master/src/core/execute.c#L1857
> >>
> >>
> >>(specifically, we all mkdir_p_label() instead of plain mkdir_p()
>  >> there)
> 
> And this is working now, presumably after a reboot?  I do so love
> non-deterministic computers.  :-/
> 
> --
> ========================================================================
> Ian Pilcher                                         arequipeno@gmail.com
> -------- "I grew up before Mark Zuckerberg invented friendship" --------
> ========================================================================
> 

  reply	other threads:[~2017-03-03 16:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01 21:40 SELinux type transition rule not working Ian Pilcher
2017-03-01 22:25 ` [systemd-devel] " Lennart Poettering
2017-03-02 15:13   ` Simon Sekidde
2017-03-03 15:44     ` Ian Pilcher
2017-03-03 16:01       ` Simon Sekidde [this message]
2017-03-03 16:45         ` Simon Sekidde
2017-03-03 19:32           ` Ian Pilcher
2017-03-03 20:19             ` Simon Sekidde
2017-03-03 21:00               ` Ian Pilcher
2017-03-01 22:28 ` cgzones
2017-03-01 23:28   ` Ian Pilcher
2017-03-01 23:51     ` Ian Pilcher
2017-03-02  6:12       ` Jason Zaman
2017-03-03 15:36         ` Ian Pilcher
2017-03-03 15:47           ` Stephen Smalley
2017-03-02  2:16 ` Russell Coker

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=333322329.27680470.1488556919299.JavaMail.zimbra@redhat.com \
    --to=ssekidde@redhat.com \
    --cc=arequipeno@gmail.com \
    --cc=lennart@poettering.net \
    --cc=selinux@tycho.nsa.gov \
    --cc=systemd-devel@lists.freedesktop.org \
    /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.