Commit Graph

5321 Commits

Author SHA1 Message Date
Chris PeBenito
3bef33fe20 Merge pull request #182 from topimiettinen/add-iwd-as-networkmanager 2020-02-16 11:11:59 -05:00
Chris PeBenito
26be8f09a6 Merge pull request #181 from topimiettinen/add-jitterentropy-as-entropyd 2020-02-16 11:06:05 -05:00
Topi Miettinen
cdd292a26d
Consider iwd equivalent to NetworkManager etc.
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2020-02-15 16:39:38 +02:00
Topi Miettinen
1d6982b0ea
Consider jitterentropy to belong to entropyd family
Also allow jitterentropy (or rather some libs) to read
/proc/crypto/fips_enabled.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2020-02-12 00:00:21 +02:00
Chris PeBenito
0d4e919176 loadkeys, init, systemd, udev: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-02-11 13:13:20 -05:00
Chris PeBenito
14656579a9 Merge pull request #152 from bauen1/systemd-fstab-generator 2020-02-11 13:03:32 -05:00
Chris PeBenito
353a19d088 Merge pull request #134 from bauen1/console-setup 2020-02-11 13:03:27 -05:00
bauen1
79ab984197
init: split init_create_pid_files interface 2020-02-08 16:16:14 +01:00
bauen1
c8d921833c
loadkeys: remove redundant ifdef 2020-02-08 16:07:32 +01:00
Chris PeBenito
61923c23d7 init, logging, systemd: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-02-08 09:40:51 -05:00
Chris PeBenito
1fe2453905 systemd: Whitespace fix.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-02-08 09:40:09 -05:00
Sugar, David
9a0c9fdd0c audit daemon can halt system, allow this to happen.
auditd can halt the system for several reasons based on configuration.
These mostly revovle around audit partition full issues.  I am seeing
the following denials when attempting to halt the system.

Jan 12 03:38:48 localhost audispd: node=localhost type=USER_AVC msg=audit(1578800328.122:1943): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { start } for auid=n/a uid=0 gid=0 path="/usr/lib/systemd/system/poweroff.target" cmdline="/sbin/init 0" scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:power_unit_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Jan 12 03:38:48 localhost audispd: node=localhost type=USER_AVC msg=audit(1578800328.147:1944): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { status } for auid=n/a uid=0 gid=0 path="/usr/lib/systemd/system/poweroff.target" cmdline="/sbin/init 0" scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:power_unit_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Jan 12 04:44:54 localhost audispd: node=localhost type=AVC msg=audit(1578804294.103:1923): avc:  denied  { getattr } for  pid=6936 comm="systemctl" path="/run/systemd/system" dev="tmpfs" ino=45 scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:systemd_unit_t:s0 tclass=dir permissive=1

 v2 - use optional rather than ifdef
 v3 - fix order

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2020-02-08 09:38:25 -05:00
Sugar, David
e1ccf0ce02 Allow systemd to getattr all files
Systemd has ConditionPath.*, ConditionFile.* and ConditionDir* which
are used to check various path/file/directory to control starting a
service.  But this requires getattr permissions on the types.
Example denials that fit the problem.

The first example is from lvm where accessing config file.

type=AVC msg=audit(1575427946.229:1624): avc:  denied  { getattr } for
pid=1 comm="systemd" path="/etc/lvm/lvm.conf" dev="dm-0" ino=51799
scontext=system_u:system_r:init_t:s0
tcontext=system_u:object_r:lvm_etc_t:s0 tclass=file permissive=0

This second example is from chronyd, but it is happening becuase I added
the conditional in a drop-in file.

type=AVC msg=audit(1575427959.882:1901): avc:  denied  { getattr } for
pid=1 comm="systemd" path="/etc/chrony.conf" dev="dm-0" ino=53824
scontext=system_u:system_r:init_t:s0
tcontext=system_u:object_r:chronyd_conf_t:s0 tclass=file permissive=1

v3 - rework to not use interface and allow getattr for all files

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2020-02-08 09:38:25 -05:00
Chris PeBenito
f95b1a141d systemd, devices: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-02-08 09:35:13 -05:00
Chris PeBenito
1b778c17c2 Merge pull request #177 from pdmorrow/sysfs 2020-02-08 09:34:25 -05:00
Peter Morrow
8872d607b7 systemd_tmpfiles_t: Allow systemd_tempfiles_t to change permissions in sysfs
Rules specified in system tmpfiles.d configuration files are often used to
change permissions on files in sysfs.

https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html

Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
2020-02-05 15:58:59 +00:00
bauen1
a573ef35af
udev: run consolesetup 2020-02-04 19:34:57 +01:00
bauen1
9ecc4103af
consolesetup: add policy for console-setup 2020-02-04 19:34:53 +01:00
bauen1
3547868a8b
udev: remove console-setup 2020-02-04 19:26:43 +01:00
bauen1
2b5d1b8299
systemd: add policy for systemd-fstab-generator 2020-02-01 22:20:35 +01:00
bauen1
4e842fe209
init: add interfaces for managing /run/systemd 2020-02-01 22:18:48 +01:00
bauen1
6fd33ae70c
systemd: remove whitespace 2020-02-01 22:18:48 +01:00
Chris PeBenito
9e4d323462 Merge pull request #173 from fishilico/mount-fuse3 2020-02-01 14:36:23 -05:00
Chris PeBenito
8cf4002a34 Merge pull request #174 from gtrentalancia/master 2020-02-01 14:36:08 -05:00
Chris PeBenito
d7f3567e4d
Merge pull request #176 from dburgener/remove-unneeded-semicolons
Remove unneeded semicolons after interface and macro calls
2020-02-01 14:35:17 -05:00
Daniel Burgener
03d39a69a1 Remove unneeded semicolons after interface and macro calls
Signed-off-by: Daniel Burgener <dburgener@tresys.com>
2020-01-31 14:41:28 -05:00
Chris PeBenito
54147754d5
Merge pull request #175 from pebenito/perf-event-open
Add perf_event access vectors.
2020-01-29 14:33:15 -05:00
Chris PeBenito
624a63704c Add perf_event access vectors.
Added in Linux v5.5.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-01-29 09:58:40 -05:00
Nicolas Iooss
a85ef68b2a
mount: label fusermount3 like fusermount
libfuse 3.0 renamed fusermount to fusermount3 in order to allow both
libfuse 2 and libfuse 3 to be installed together:
695e45a4de

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2020-01-26 18:47:33 +01:00
Chris PeBenito
7e191b008e storage, systemd: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-01-25 14:55:31 -05:00
Chris PeBenito
d3f1e699c9 Merge pull request #149 from fishilico/systemd-logind-bootloader 2020-01-25 14:49:36 -05:00
Chris PeBenito
b00cb2e910 userdomain: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-01-25 14:32:50 -05:00
Chris PeBenito
fdb28ea98d Merge pull request #167 from gtrentalancia/master 2020-01-25 14:32:20 -05:00
Chris PeBenito
b3c1af9580 various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-01-25 13:48:52 -05:00
Chris PeBenito
62c027fd39 Merge pull request #151 from bauen1/fix-xfce4-labels 2020-01-25 13:39:30 -05:00
Chris PeBenito
ad58326d7d Merge pull request #170 from Jarel1337/patch-1 2020-01-25 13:39:19 -05:00
Chris PeBenito
0a8fd613de Merge pull request #156 from fishilico/groupadd-dynamic-users 2020-01-25 13:38:53 -05:00
Chris PeBenito
b8cab95a97 Merge pull request #169 from gtrentalancia/pulseaudio-update 2020-01-25 13:37:30 -05:00
Chris PeBenito
5fd902dac4 Merge pull request #171 from fishilico/unconfined-role-wine 2020-01-25 13:36:31 -05:00
Chris PeBenito
a6576234c8 Merge pull request #166 from dburgener/remove-unused-requires 2020-01-25 13:34:34 -05:00
Nicolas Iooss
7558698ab1
usermanage: allow groupadd to lookup dynamic users from systemd
On a Debian 10 test virtual machine, when installing packages adds a
group, the following AVC occurs:

    type=USER_AVC msg=audit(1578863991.588:575): pid=381 uid=104
    auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t
    msg='avc:  denied  { send_msg } for msgtype=method_call
    interface=org.freedesktop.systemd1.Manager
    member=LookupDynamicUserByName dest=org.freedesktop.systemd1
    spid=13759 tpid=1 scontext=unconfined_u:unconfined_r:groupadd_t
    tcontext=system_u:system_r:init_t tclass=dbus permissive=1
    exe="/usr/bin/dbus-daemon" sauid=104 hostname=? addr=? terminal=?'

Allow groupadd to use nss-systemd, which calls DBUS method
LookupDynamicUserByName().

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2020-01-25 16:43:18 +01:00
Nicolas Iooss
8426d24740
systemd: add an interface to use nss-systemd
systemd's Name Service Switch (NSS) module provides UNIX user and group
name resolution for dynamic users and groups allocated through options
such as DynamicUser= in systemd unit files, according to its man page,
https://github.com/systemd/systemd/blob/v244/man/nss-systemd.xml.

If systemd compiled without NOLEGACY, commit
24eccc3414
("nss-systemd,user-util: add a way how synthesizing "nobody" can be
turned off") implemented a way to tweak nss-systemd's behavior by
checking whether /etc/systemd/dont-synthesize-nobody exists. Allow this
access.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2020-01-25 16:43:17 +01:00
bauen1
c233f661a0
kernel/corecommands: fix the label of xfce4 helpers (on debian) 2020-01-25 16:34:47 +01:00
Nicolas Iooss
3e96715906
Associate role unconfined_r to wine_t
When an unconfined user runs wine, there is an issue because
wine_domtrans() causes a transition to unconfined_u:unconfined_r:wine_t
without unconfined_r being associated with wine_t:

    type=SELINUX_ERR msg=audit(1579963774.148:1047):
    op=security_compute_sid
    invalid_context="unconfined_u:unconfined_r:wine_t"
    scontext=unconfined_u:unconfined_r:wine_t
    tcontext=system_u:object_r:wine_exec_t tclass=process

This is fixed with "roleattribute unconfined_r wine_roles;", which is
provided by interface wine_run().

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2020-01-25 16:34:07 +01:00
Vilgot Fredenberg
043cc4d644
Remove obsolete gentoo specific rule
Looking at all audit versions in gentoo (2.8.5 to 2.6.4) every single one of them has `var/log/audit` as a directory and not as a file.

Tested on gentoo.
2020-01-25 12:40:08 +01:00
Guido Trentalancia
eaaaa89208 Allow pulseaudio to watch generic device directories.
Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
--
 policy/modules/apps/pulseaudio.te |    1 +
 1 file changed, 1 insertion(+)
2020-01-24 22:32:37 -08:00
Guido Trentalancia
e3dc006c41 Add an interface to allow watch permission on generic
device directories.

Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
--
 policy/modules/kernel/devices.if |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
2020-01-24 22:31:24 -08:00
Guido Trentalancia
3415d17e7f Allow userdomain to read and write the wireless devices (for
example for querying their state, enabling and/or disabling
them using userspace tools such as "rfkill" from util-linux).

See also:
https://wireless.wiki.kernel.org/en/users/documentation/rfkill

Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
---
 policy/modules/system/userdomain.if |    1 +
 1 file changed, 1 insertion(+)
2020-01-24 11:29:27 -08:00
Daniel Burgener
36c3a7903c Fix situations where require blocks in interfaces listed types not actually referenced by that interface
Signed-off-by: Daniel Burgener <dburgener@tresys.com>
2020-01-24 08:18:55 -05:00
Guido Trentalancia
0fecf1a39a Update the pulseaudio application module with a few user domain
file read and management permissions.

Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
---
 policy/modules/apps/pulseaudio.te |    1 +
 1 file changed, 1 insertions(+)
2020-01-23 22:01:51 +01:00