All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: Dominick Grift <dominick.grift@defensec.nl>
Cc: selinux-refpolicy@vger.kernel.org
Subject: Re: [PATCH] misc services patches
Date: Fri, 22 Jan 2021 13:24:53 +1100	[thread overview]
Message-ID: <3798733.Xe6EjoDzsm@liv> (raw)
In-Reply-To: <60db511b-f9a3-5489-182b-88a0b727b9c2@defensec.nl>

On Friday, 22 January 2021 12:35:42 AM AEDT Dominick Grift wrote:
> >>> +++ refpolicy-2.20210120/policy/modules/services/ssh.te
> >>> @@ -268,6 +268,7 @@ ifdef(`init_systemd',`
> >>> 
> >>> init_dbus_chat(sshd_t)
> >>> systemd_dbus_chat_logind(sshd_t)
> >>> init_rw_stream_soconnectivitycheck.cbg-app.huawei.comckets(sshd_t)
> >>> 
> >>> +       systemd_read_logind_sessions_files(sshd_t)
> >> 
> >> This should probably be addressed on the lower authlogin level instead
> > 
> > auth_login_pgm_domain()?
> 
> I would consider adding it to auth_use_pam(). but its a good question.
> 
> > In another patch I have systemd_connect_machined(sshd_t) which I guess
> > should go in the same one too.
> 
> Which patch was that?

A patch I haven't sent to the list yet.

> That does not look right if only that the name of
> the interface isnt very descriptive (there is no way unix stream connect
> or unix dgram sendto machined.
> 
> So this is either about systemd's nss mymachines (in which case it
> belongs in auth_use_nsswitch() or about reading systemd
> /var/run/machines in which case the interface name is wrong.

I don't have the libnss-systemd or libnss-mymachines packages installed on the 
machines that are giving this, /etc/nsswitch.conf hasn't been changed since 
2018.

When I comment out the pam_systemd.so line from /etc/pam.d/common-session that 
access isn't required.  So it's a PAM thing.

+interface(`systemd_connect_machined',`
+       gen_require(`
+               type systemd_machined_t;
+       ')
+
+       allow $1 systemd_machined_t:unix_stream_socket connectto;
+')

Should I put this access in systemd_stream_connect_userdb()?  The socket file 
is /run/systemd/userdb/io.systemd.Machine and is labelled as 
systemd_userdb_runtime_t.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/




  parent reply	other threads:[~2021-01-22  2:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 10:08 [PATCH] misc services patches Russell Coker
2021-01-20 14:53 ` Dominick Grift
2021-01-21 13:25   ` Russell Coker
2021-01-21 13:35     ` Dominick Grift
2021-01-21 13:40       ` Dominick Grift
2021-01-22  2:24       ` Russell Coker [this message]
2021-01-22  7:02         ` Dominick Grift
  -- strict thread matches above, loose matches on Subject: below --
2021-02-03  4:08 Russell Coker
2021-02-03 18:06 ` Dominick Grift
2019-01-04  7:33 Russell Coker
2019-01-05 18:34 ` Chris PeBenito

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=3798733.Xe6EjoDzsm@liv \
    --to=russell@coker.com.au \
    --cc=dominick.grift@defensec.nl \
    --cc=selinux-refpolicy@vger.kernel.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.