Commit Graph

763 Commits

Author SHA1 Message Date
Chris PeBenito 60114027f7 more systemd stuff from Russell Coker
This patch adds an interface to manage systemd_passwd_var_run_t symlinks that
I'll add another patch to use shortly.

It has a number of changes needed by systemd_logind_t to set permissions for
local logins.

It has some more permissions that systemd_machined_t needs, I don't think it's
everything that systemd_machined_t needs but it's a start.

It has some changes for udev_t for systemd-udevd.
2017-04-16 19:48:04 -04:00
Nicolas Iooss 69c742f11b
Support systems with a single /usr/bin directory
On systems such as Arch Linux, all programs which are usually located in
/bin, /sbin, /usr/bin and /usr/sbin are present in /usr/bin and the
other locations are symbolic links to this directory.  With such a
configuration, the file contexts which define types for files in
/bin, /sbin and /usr/sbin need to be duplicated to provide definitions
for /usr/bin/...

As the "/bin vs. /usr/bin" part of the needed definitions has already
been done with the "usr merge" patches, the next step consists in
duplicating file contexts for /usr/sbin. This is what this patch does
for all modules which are not in contrib.

This is the second iteration of an idea I have previously posted on
http://oss.tresys.com/pipermail/refpolicy/2017-March/009176.html
2017-04-15 20:49:07 +02:00
Chris PeBenito 73d8b3026c Systemd-related changes from Russell Coker. 2017-04-06 17:37:50 -04:00
Chris PeBenito b690079a93 Misc fc changes from Russell Coker. 2017-04-06 17:00:28 -04:00
Chris PeBenito 2cd92db5cd systemd-nspawn again
This patch doesn't do everything that is needed to have systemd-nspawn work.
But it does everything that is needed and which I have written in a clear and
uncontroversial way.  I think it's best to get this upstream now and then
either have a separate discussion about the more difficult issues, or wait
until I devise a way of solving those problems that's not too hacky.

Who knows, maybe someone else will devise a brilliant solution to the remaining
issues after this is accepted upstream.

Also there's a tiny patch for systemd_machined_t that is required by
systemd_nspawn_t.

Description: systemd-nspawn
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2017-03-29
2017-04-01 12:08:42 -04:00
Chris PeBenito 160d08f3ae systemd-resolvd, sessions, and tmpfiles take2
I believe that I have addressed all the issues Chris raised, so here's a newer
version of the patch which applies to today's git version.

Description: systemd-resolved, sessions, and tmpfiles patches
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2017-03-26
2017-03-28 18:51:35 -04:00
Chris PeBenito b411e4b300 another version of systemd cgroups hostnamed and logind
From Russell Coker
2017-03-25 13:45:37 -04:00
Chris PeBenito 5e20a0ee5b /var/run -> /run again
Here's the latest version of my patch to remove all /var/run when it's not
needed.  I have removed the subst thing from the patch, but kept a
distro_debian bit that relies on it.  So with this patch the policy won't
install if you build it with distro_debian unless you have my subst patch.
Chris, if your automated tests require that it build and install with
distro_debian then skip the patch for sysnetwork.fc.

From Russell Coker
2017-03-25 12:56:03 -04:00
Chris PeBenito 4d028498d8 Module version bumps for fixes from cgzones. 2017-03-05 10:48:42 -05:00
cgzones cef1f7bb29 corecommands: fix corecmd_*_bin() for usr merged systems 2017-03-03 11:53:35 +01:00
Chris PeBenito 2f3691e4c8 Merge pull request #103 from fishilico/validate_modular_fc
Make "validate" target verify file contexts
2017-02-28 19:49:33 -05:00
Chris PeBenito 40ef165744 Module version bump for misc fixes from cgzones. 2017-02-28 19:42:24 -05:00
Chris PeBenito aa0665cfac Merge branch 'monit_depend' of git://github.com/cgzones/refpolicy 2017-02-28 19:31:33 -05:00
Nicolas Iooss 2e2088b401
devices: fix Debian file contexts
When using setfiles to validate file contexts of Debian modular policy
(with DISTRO=debian and MONOLITHIC=n), it fails with:

    tmp/all_mods.fc:  line 527 is missing fields
    tmp/all_mods.fc:  line 527 is missing fields
    tmp/all_mods.fc: Invalid argument

Here is the content of tmp/all_mods.fc around line 527:

    # this is a static /dev dir "backup mount"
    # if you want to disable udev, youll have to boot permissive and relabel!
    /dev/\.static           -d      system_u:object_r:device_t
    /dev/\.static/dev       -d      system_u:object_r:device_t
    /dev/\.static/dev/(.*)?         <<none>>
    '

The quote of "you'll" has been eaten by m4 and there is a spurious quote
on the last line, which is reported by setfiles. Fix this by removing
the quote in the comment.

Here is an example of a failed build on Travis-CI:
https://travis-ci.org/fishilico/selinux-refpolicy-patched/jobs/205951446
2017-02-27 22:24:02 +01:00
Chris PeBenito 1fc4753443 devices: Fix docs for dev_write_generic_sock_files(). 2017-02-25 11:50:31 -05:00
Chris PeBenito 9f99cfb771 Network daemon patches from Russell Coker. 2017-02-25 11:20:19 -05:00
Chris PeBenito e527ebaadf systemd: Further revisions from Russell Coker. 2017-02-25 09:35:10 -05:00
Chris PeBenito 2087bde934 Systemd fixes from Russell Coker. 2017-02-23 20:03:23 -05:00
cgzones e4f3940729 add fs_getattr_dos_dirs()
useful
2017-02-20 14:20:33 +01:00
cgzones c753c066d1 add corecmd_check_exec_bin_files()
useful for monit
2017-02-20 14:20:33 +01:00
Chris PeBenito 53fb3a3ba4 dpkg: Updates from Russell Coker. 2017-02-19 16:13:14 -05:00
Chris PeBenito 3726cd58f6 Module version bump for changes from cgzones. 2017-02-18 12:28:38 -05:00
Chris PeBenito abe9e18f73 Merge branch 'var_and_run' of git://github.com/cgzones/refpolicy 2017-02-18 11:54:16 -05:00
Chris PeBenito e96c357b79 Merge branch 'corecmd_module' of git://github.com/cgzones/refpolicy 2017-02-18 11:51:40 -05:00
Chris PeBenito 959f78de99 Merge branch 'setfiles_getattr' of git://github.com/cgzones/refpolicy 2017-02-18 11:34:23 -05:00
Chris PeBenito cb35cd587f Little misc patches from Russell Coker. 2017-02-18 09:39:01 -05:00
cgzones 7ff92a886a files: no default types for /run and /var/lock
encourage private types for /run and /var/lock by not providing default contexts anymore
2017-02-16 17:14:38 +01:00
cgzones da1ea093cb corecommands: label some binaries as bin_t 2017-02-16 17:05:26 +01:00
cgzones 7539f65bc2 setfiles: allow getattr to kernel pseudo fs
userdomains should not alter labels of kernel pseudo filesystems, but allowing setfiles/restorecon(d) to check the contexts helps spotting incorrect labels
2017-02-16 15:26:29 +01:00
Russell Coker 5a6251efc6 tiny mon patch
When you merged the mon patch you removed the ability for mon_t to execute
lib_t files.

The following patch re-enables the ability to execute alert scripts.
2017-02-15 18:51:39 -05:00
Chris PeBenito 1720e109a3 Sort capabilities permissions from Russell Coker. 2017-02-15 18:47:33 -05:00
Chris PeBenito e9b2a7943c Module version bump for bootloader patch revert. Plus compat alias. 2017-02-11 14:51:21 -05:00
Chris PeBenito aeea0d9f3f mon policy from Russell Coker. 2017-02-08 16:56:09 -05:00
Chris PeBenito 69da46ae18 usrmerge FC fixes from Russell Coker. 2017-02-07 18:51:58 -05:00
Chris PeBenito 2e7553db63 Create / to /usr equivalence for bin, sbin, and lib, from Russell Coker. 2017-02-04 15:19:35 -05:00
Chris PeBenito 69ede859e8 Bump module versions for release. 2017-02-04 13:30:53 -05:00
Chris PeBenito b05d72b0d3 Module version bump for cpu_online genfscon from Laurent Bigonville. 2017-01-09 20:36:27 -05:00
Laurent Bigonville 3d8669d8ce Use genfscon to label /sys/devices/system/cpu/online as cpu_online_t
Since 8e01472078763ebc1eaea089a1adab75dd982ccd, it's possible to use
genfscon for sysfs.

This patch should help to deprecate distribution specific call to
restorecon or tmpfiles to restore /sys/devices/system/cpu/online during
boot.

Thanks to Dominick for the tip.
2017-01-09 20:35:47 -05:00
Chris PeBenito 0fe21742cd Module version bumps for patches from cgzones. 2017-01-09 20:34:15 -05:00
Chris PeBenito 9387d5c324 Merge branch 'files_search_src' of git://github.com/cgzones/refpolicy 2017-01-09 18:12:38 -05:00
Chris PeBenito 41661ed4b3 Merge branch 'terminal_module' of git://github.com/cgzones/refpolicy 2017-01-09 18:12:02 -05:00
cgzones 05a9fdfe6e update corenetwork module
* remove deprecated interfaces
* label tcp port 2812 for monit
2017-01-06 15:06:37 +01:00
cgzones 11a0508ede update terminal module
* label content of /dev/pts/ correctly
* remove deprecated interfaces
2017-01-06 15:03:08 +01:00
cgzones ab652e1f59 add files_search_src()
required by loadkeys
2017-01-05 12:47:58 +01:00
Chris PeBenito 49545aad8f Module version bump for patches from Guido Trentalancia. 2016-12-30 14:15:06 -05:00
Guido Trentalancia cd85f4705d kernel: add missing plymouth interface
Add a previously missed optional plymouth interface to the kernel
module.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-30 12:57:20 -05:00
Chris PeBenito 67c435f1fc Module version bump for fc updates from Nicolas Iooss. 2016-12-28 14:38:05 -05:00
Chris PeBenito b6b7173fb1 Merge branch 'usr-fc' of git://github.com/fishilico/selinux-refpolicy-patched 2016-12-28 14:30:19 -05:00
Nicolas Iooss 85d678bd2f
Add file contexts in /usr for /bin, /usr/sbin and /usr/lib
Some policy modules define file contexts in /bin, /sbin and /lib without
defining similar file contexts in the same directory under /usr.

Add these missing file contexts when there are outside ifdef blocks.
2016-12-27 17:06:54 +01:00
Chris PeBenito e378390e8d Module version bump for systemd patch from Nicolas Iooss. 2016-12-27 10:56:39 -05:00
Chris PeBenito 9fa51f58c3 Merge branch '2016-12-27_systemd' of git://github.com/fishilico/selinux-refpolicy-patched 2016-12-27 10:54:31 -05:00
Chris PeBenito 19c3addb99 Module version bump for patches from Guido Trentalancia. 2016-12-27 10:51:56 -05:00
Guido Trentalancia d52463b9fe kernel: missing permissions for confined execution
This patch adds missing permissions in the kernel module that prevent
to run it without the unconfined module.

This second version improves the comment section of new interfaces:
"Domain" is replaced by "Domain allowed access".

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-27 10:38:07 -05:00
Guido Trentalancia 732234f8b6 modutils: update to run in confined mode
Update the modutils module so that it can run in confined
mode instead of unconfined mode.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-27 10:23:58 -05:00
Nicolas Iooss 0494f3c0b9
Allow searching /proc/sys/fs when using /proc/sys/fs/binfmt_misc
Interface fs_register_binary_executable_type allow registering
interpreters using a filesystem monted on /proc/sys/fs/binfmt_misc. In
order to access this filesystem, the process needs to search every
parent directory of the mountpoint.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2016-12-27 15:01:40 +01:00
Chris PeBenito f850ec37df Module version bumps for /run fc changes from cgzones. 2016-12-22 15:54:46 -05:00
cgzones 7d376d7e4d transition file contexts to /run
Remove file context aliases and update file context paths to use the /run filesystem path.
Add backward compatibility file context alias for /var/run using applications like https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783321
Lock files are still seated at /var/lock
2016-12-17 18:32:39 +01:00
Chris PeBenito 97470c7670 Module version bump for kernel sysctl patch from Luis Ressel 2016-12-06 20:26:43 -05:00
Luis Ressel 8d8c849428 kernel.if: Allow listing /proc/sys/net/unix
The kernel_read_unix_sysctls() and kernel_rw_unix_sysctls() currenly
don't allow listing the /proc/sys/net/unix directory, contrary to the
other sysctl interfaces.
2016-12-06 20:25:58 -05:00
cgzones d8cb498284 remove trailing whitespaces 2016-12-06 13:45:13 +01:00
Chris PeBenito f9c98632f5 Module version bumps for patches from Guido Trentalancia. 2016-10-30 14:31:50 -04:00
Guido Trentalancia via refpolicy b7f5fa6ac7 Let the user list noxattr fs directories
When reading or managing noxattr fs files or symbolic links, also
let the user list noxattr fs directories.

This patch should be applied after the following one:

http://oss.tresys.com/pipermail/refpolicy/2016-October/008539.html

"Let users read/manage symlinks on fs that do not support xattr"

posted on Sat, 29 Oct 2016 15:39:46 UTC.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-10-30 14:25:22 -04:00
Guido Trentalancia via refpolicy c23fe5c298 Let users read/manage symlinks on fs that do not support xattr
Let unprivileged and administrative users read symbolic links on
filesystems that do not support extended attributes (xattr) such
as cdroms, FAT, NTFS and so on.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-10-30 14:24:52 -04:00
Russell Coker 44bedbfad0 single binary modutils
On Tuesday, 2 August 2016 7:59:28 PM AEDT Chris PeBenito wrote:
> On 07/31/16 08:34, Russell Coker wrote:
> > The following patch deals with a single binary for modutils, so depmod_t,
> > and insmod_t are merged.
>
> Since the main SELinux distros (including RHEL/CentOS 7) all have merged
> modutils these days, I'm open to taking a patch that fully merges these
> domains (in which case renaming to kmod_t, with proper aliasing seems
> the best idea).
>
> However, it's been some time since I used a busybox-based system; does
> busybox still have separated tools?  Yes, this is a bit of an obvious
> question since busybox is also single-binary, but IIRC, the embedded
> guys made some tiny helper scripts or executables so proper
> transitioning could occur.  Separate domains may still make sense.

As we have had no response from Busybox users in the last 3 months and also no
response to the thread Luis started in 2013 I think it's safe to assume that
they don't need this.

I've attached a new patch which renames to kmod_t as you suggested.  Please
consider it for inclusion.

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

Description: Change modutils policy to match the use of a single binary
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2014-06-25
2016-10-23 19:12:07 -04:00
Chris PeBenito 34055cae87 Bump module versions for release. 2016-10-23 16:58:59 -04:00
Chris PeBenito 07451cd39a Module version bumps for syncthing from Naftuli Tzvi Kay. 2016-10-09 07:51:51 -04:00
Chris PeBenito 383badcee5 Merge branch 'feature/syncthing' of https://github.com/rfkrocktk/refpolicy into rfkrocktk-feature/syncthing 2016-10-09 07:48:10 -04:00
Chris PeBenito c720d99e30 Module version bump for module_load perm use from Guido Trentalancia. 2016-08-29 20:29:46 -04:00
Guido Trentalancia 5c5d2d8d49 Add module_load permission to can_load_kernmodule
The "module_load" permission has been recently added to the "system"
class (kernel 4.7).

The following patch updates the Reference Policy so that the new
permission is allowed when a kernel module should be loaded.

To preserve the module encapsulation, a new interface is defined
in the kernel files module and that interface is then used in the
kernel module.

A short note is added about unneeded permissions that set the
kernel scheduling parameters (might lead to service disruption).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-08-29 20:29:46 -04:00
Naftuli Tzvi Kay ba903b4840
Add Syncthing Support to Policy
For now, optionally add the Syncthing role to user_r, staff_r,
and unconfined_r, and define the Syncthing ports in core network.
2016-08-21 11:57:01 -07:00
Chris PeBenito 1f4b280519 corenetwork: Missed version bump for previous commit. 2016-08-07 16:07:35 -04:00
Chris PeBenito ae0ba583d3 corenetwork: Add port labeling for Global Catalog over LDAPS. 2016-08-07 14:46:42 -04:00
Chris PeBenito 461451d7a7 Get attributes of generic ptys, from Russell Coker. 2016-07-30 16:25:42 -04:00
Chris PeBenito 9f55b76f2a Module version bump for MLS relabeling patch from Lukas Vrabec. 2016-07-27 18:37:56 -04:00
Lukas Vrabec d4964ae808 Add new MLS attribute to allow relabeling objects higher than system low. This exception is needed for package managers when processing sensitive data.
Example of denial:
type=AVC msg=audit(1461664028.583:784): avc:  denied  { relabelto } for
pid=14322 comm="yum" name="libvirt" dev="dm-0" ino=670147
scontext=root:system_r:rpm_t:s0
tcontext=system_u:object_r:virt_cache_t:s0-s15:c0.c1023 tclass=dir
2016-07-27 18:32:24 -04:00
Chris PeBenito 611a617cde Module version bump for corecommands update from Garrett Holmstrom. 2016-06-30 20:36:16 -04:00
Garrett Holmstrom 58ac82612d corecmd: Remove fcontext for /etc/sysconfig/libvirtd
/etc/sysconfig/libvirtd does not have the executable bit set, so it does
not make sense for it to be labelled bin_t.  I can't seem to find the
reason it was set that way originally.

Signed-off-by: Garrett Holmstrom <gholms@devzero.com>
2016-06-30 20:34:49 -04:00
Chris PeBenito 672ea96b45 Module version bump for mlstrustedsocket from qqo. 2016-05-31 09:15:40 -04:00
Chris PeBenito 203d4a70db Merge branch 'master' of https://github.com/qqo/refpolicy into qqo-master 2016-05-31 09:04:38 -04:00
Chris PeBenito cce300b960 Module version bump for LMNR port from Laurent Bigonville. 2016-05-26 07:47:18 -04:00
Laurent Bigonville 8f6cd59aea Add llmnr/5355 (Link-local Multicast Name Resolution) 2016-05-26 07:46:03 -04:00
qqo aedd5c314d Adds attribute mlstrustedsocket, along with the interface.
Sample AVC:
 type=AVC msg=audit(1459979143.990:219): avc:  denied  { sendto } for  pid=1935
 comm="charon" path="/dev/log" scontext=system_u:system_r:initrc_t:s0-s3:c0.c31
 tcontext=system_u:system_r:syslogd_t:s3:c0.c31 tclass=unix_dgram_socket permissive=0

This was discussed in 2010: http://oss.tresys.com/pipermail/refpolicy/2010-November/003444.html
2016-04-12 19:28:13 +03:00
Chris PeBenito 599e5cf7f5 Module version bump for patches from Dominick Grift and Lukas Vrabec. 2016-03-31 08:32:18 -04:00
Lukas Vrabec 78d42e648b SELinux support for cgroup2 filesystem.
With the new "cgroup2" system added in kernel 4.5, systemd is getting
selinux denials when manipulating the cgroup hierarchy.

Pull request in systemd with cgroup2 support:
https://github.com/systemd/systemd/pull/2903

AVC when writing process numbers to move them to the right cgroup:
Mar 29 19:58:30 rawhide kernel: audit: type=1400
audit(1459295910.257:68): avc:  denied  { write } for  pid=1
comm="systemd" name="cgroup.procs" dev="cgroup2" ino=6
scontext=system_u:system_r:init_t:s0
tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=1

In this case new filesystem "cgroup2" need to be labeled as cgroup_t.

Signed-off-by: Lukas Vrabec <lvrabec@redhat.com>
2016-03-31 08:22:56 -04:00
Chris PeBenito f72f1a48d9 Module version bump for Debian fc entries from Laurent Bigonville. 2016-03-28 09:59:02 -04:00
Laurent Bigonville af61f22e24 Add some labels for SELinux tools path in Debian 2016-03-25 22:35:17 +01:00
Chris PeBenito 464c5df247 Reduce broad entrypoints for unconfined domains.
Entrypoints into unconfined domains, like with confined domains, should be
tightly controlled to make arbitrary code execution more difficult.
2016-03-22 15:43:30 -04:00
Chris PeBenito 5db5b62c42 Module version bump for several Arch fixes from Nicolas Iooss. 2016-03-22 15:34:53 -04:00
Chris PeBenito 84a8181a8d Merge branch 'kdevtmpfs-unlink' of https://github.com/fishilico/selinux-refpolicy-patched 2016-03-22 15:27:21 -04:00
Chris PeBenito df8488bf69 Merge branch 'dev_setattr_dlm_control-typo' of https://github.com/fishilico/selinux-refpolicy-patched 2016-03-22 15:26:42 -04:00
Nicolas Iooss 4bf3dfaeb2 Allow kdevtmpfs to unlink fixed disk devices
When a device gets removed, for example with "cryptsetup close",
kdevtmpfs (a kernel thread) removes its entry from devtmpfs filesystem:

    avc:  denied  { unlink } for  pid=48 comm="kdevtmpfs"
    name="dm-4" dev="devtmpfs" ino=144111
    scontext=system_u:system_r:kernel_t
    tcontext=system_u:object_r:fixed_disk_device_t tclass=blk_file

Allow this access on systems using systemd.
2016-03-19 11:12:28 +01:00
Nicolas Iooss 242fa9347a Fix typo in dev_setattr_dlm_control interface requirements 2016-03-19 10:54:40 +01:00
Nicolas Iooss e43b1e2ffc Do not label /usr/lib/gvfs/libgvfscommon.so as bin_t
On Arch Linux, /usr/lib/gvfs directory contains both executable files
(gvfsd, gvfs-udisks2-volume-monitor...) and libraries (libgvfscommon.so
and libgvfsdaemon.so).  As all executable files are prefixed with
"gfvs", so use this to distinguish them with the libraries.

This fixes the following AVC denials, reported from geoclue service
using a library wrongly labelled bin_t:

    avc:  denied  { read } for  pid=14872 comm="geoclue"
    name="libgvfscommon.so" dev="dm-0" ino=3152594
    scontext=system_u:system_r:geoclue_t
    tcontext=system_u:object_r:bin_t tclass=file permissive=1

    avc:  denied  { open } for  pid=14872 comm="geoclue"
    path="/usr/lib/gvfs/libgvfscommon.so" dev="dm-0" ino=3152594
    scontext=system_u:system_r:geoclue_t
    tcontext=system_u:object_r:bin_t tclass=file permissive=1

     avc:  denied  { execute } for  pid=14872 comm="geoclue"
     path="/usr/lib/gvfs/libgvfscommon.so" dev="dm-0" ino=3152594
     scontext=system_u:system_r:geoclue_t
     tcontext=system_u:object_r:bin_t tclass=file permissive=1
2016-03-19 10:39:17 +01:00
Nicolas Iooss 4b1cd5b369 Label some user session DBus services as bin_t 2016-03-19 10:39:17 +01:00
Nicolas Iooss 2cedfc0ada Label gedit plugins properly on Arch Linux 2016-03-19 10:39:17 +01:00
Nicolas Iooss 55f64a8112 Label system-config-printer applet properly on Arch Linux
It is used by system-config-printer, as shown by these AVC denials:

    avc:  denied  { execute } for  pid=1061 comm="system-config-p"
    name="applet.py" dev="dm-0" ino=9568316
    scontext=sysadm_u:sysadm_r:sysadm_t tcontext=system_u:object_r:usr_t
    tclass=file permissive=1

    avc:  denied  { execute_no_trans } for  pid=1061
    comm="system-config-p"
    path="/usr/share/system-config-printer/applet.py" dev="dm-0"
    ino=9568316 scontext=sysadm_u:sysadm_r:sysadm_t
    tcontext=system_u:object_r:usr_t tclass=file permissive=1
2016-03-19 10:39:17 +01:00
Nicolas Iooss 90599ef760 Label TexLive scripts bin_t
These scripts can be run by users.
2016-03-19 10:39:17 +01:00
Chris PeBenito 1240e0ab7b Module version bump for efivarfs patches from Dan Walsh, Vit Mojzis, and Laurent Bigonville 2016-02-03 08:49:39 -05:00
Vit Mojzis 17bd45dab9 Add interface to allow reading files in efivarfs - contains Linux Kernel configuration options for UEFI systems (UEFI Runtime Variables) 2016-02-03 13:33:43 +01:00
Dan Walsh 498df2c5b9 Add label for efivarfs 2016-02-03 13:24:43 +01:00
Chris PeBenito 4a0e5fffc7 Module version bump for patches from Nicolas Iooss and Grant Ridder. 2016-02-02 09:35:30 -05:00
Nicolas Iooss 82cdf3b724 Label /sys/kernel/debug/tracing filesystem
tracefs filesystem is automounted in /sys/kernel/debug/tracing directory
since Linux 4.1.  Label this filesystem properly.

Linux commit:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f76180bc07abc399977bfbe8c43bf58c4570e893
2016-02-02 09:33:34 -05:00
Grant Ridder 976af3482a Add redis-sentinel port to redis network_port def 2016-02-02 09:33:34 -05:00
Nicolas Iooss c82a479ed8 Fix interface descriptions when duplicate ones are found
Distinct interfaces should have different comments
2016-01-19 00:17:34 +01:00
Nicolas Iooss 29d543da4c Fix typos in comments from corenetwork module 2016-01-19 00:17:05 +01:00
Chris PeBenito 24e6175132 Module version bump for systemd PrivateNetwork patch from Nicolas Iooss 2016-01-11 13:26:55 -05:00
Nicolas Iooss 25bc2d5c1d Allow systemd services to use PrivateNetwork feature
systemd creates a new network namespace for services which are using
PrivateNetwork=yes.

In the implementation, systemd uses a socketpair as a storage buffer for
the namespace reference file descriptor (c.f.
https://github.com/systemd/systemd/blob/v228/src/core/namespace.c#L660).
One end of this socketpair is locked (hence the need of "lock" access to
self:unix_dgram_socket for init_t) while systemd opens
/proc/self/ns/net, which lives in nsfs.

While at it, add filesystem_type attribute to nsfs_t.
2016-01-11 13:17:16 -05:00
Chris PeBenito 619b4adf78 Add a type and genfscon for nsfs. 2016-01-11 09:02:39 -05:00
Chris PeBenito cc248fc976 Module version bump for syslog and systemd changes from Laurent Bigonville 2016-01-06 09:22:11 -05:00
Chris PeBenito 5922346539 Merge branch 'systemd-1' of git://github.com/bigon/refpolicy into bigon-systemd-1 2016-01-06 09:13:47 -05:00
Chris PeBenito 2c465410d9 Add neverallow for mac_override capability. It is not used by SELinux. 2016-01-06 09:09:36 -05:00
Chris PeBenito 994f605a2c Module version bump for Xorg and SSH patches from Nicolas Iooss. 2016-01-05 13:38:19 -05:00
Nicolas Iooss 3505a51d76 Label OpenSSH files correctly on Arch Linux
On Arch Linux, OpenSSH installs these binary files in /usr/lib/ssh:

* sftp-server (labeled with ssh_keysign_exec_t type in refpolicy)
* ssh-askpass (symlink to x11-ssh-askpass)
* ssh-keysign
* ssh-pkcs11-helper
* x11-ssh-askpass (from x11-ssh-askpass package)

Label all these files but sftp-server as bin_t.
2016-01-05 13:22:52 -05:00
Laurent Bigonville c0e95ed326 On Debian, systemd binaries are installed in / not /usr
On Debian, systemd binaries are installed in / not /usr, add an
equivalence for this.
2015-12-14 22:52:47 +01:00
Chris PeBenito 2b972fefd1 Module version bump for vm overcommit sysctl interfaces from Laurent Bigonville. 2015-12-14 10:04:14 -05:00
Laurent Bigonville 4340b9f8a4 Add interfaces to read/write /proc/sys/vm/overcommit_memory 2015-12-14 10:02:53 -05:00
Chris PeBenito 6b1b2e3965 Module version bumps for 2 patches from Dominick Grift. 2015-12-10 15:46:13 -05:00
Dominick Grift 6d6370c98a kernel: implement sysctl_vm_overcommit_t for /proc/sys/vm/overcommit_memory
Whoever requires this type first gets to create the interfaces to operate on this object

Signed-off-by: Dominick Grift <dac.override@gmail.com>
2015-12-10 14:10:16 -05:00
Chris PeBenito c23353bcd8 Bump module versions for release. 2015-12-08 09:53:02 -05:00
Chris PeBenito b94f45d760 Revise selinux module interfaces for perms protected by neverallows.
Use the allow rules on the relevant attributes in selinux.te, rather than
only using the attribute to pass the neverallows.

Closes #14
2015-11-04 15:10:29 -05:00
Chris PeBenito 17694adc7b Module version bump for systemd additions. 2015-10-23 14:53:14 -04:00
Chris PeBenito bdfc7e3eb0 Add sysfs_types attribute.
Collect all types used to label sysfs entries.
2015-10-23 10:17:46 -04:00
Chris PeBenito f7286189b3 Add systemd units for core refpolicy services.
Only for services that already have a named init script.

Add rules to init_startstop_service(), with conditional arg until
all of refpolicy-contrib callers are updated.
2015-10-23 10:17:46 -04:00
Chris PeBenito 579849912d Add supporting rules for domains tightly-coupled with systemd. 2015-10-23 10:17:46 -04:00
Chris PeBenito 3639880cf6 Implement core systemd policy.
Significant contributions from the Tresys CLIP team.

Other changes from Laurent Bigonville.
2015-10-23 10:16:59 -04:00
Chris PeBenito 4d28cb714f Module version bump for patches from Jason Zaman/Matthias Dahl. 2015-10-12 09:31:18 -04:00
Jason Zaman b3a95b4aeb Add overlayfs as an XATTR capable fs
The module is called "overlay" in the kernel
2015-10-12 09:13:53 -04:00
Chris PeBenito cfaeb62603 Module version bump for vfio device from Alexander Wetzel. 2015-09-15 08:39:21 -04:00
Alexander Wetzel 9ae4033beb adds vfio device support to base policy
Signed-off-by: Alexander Wetzel <alexander.wetzel@web.de>
2015-09-15 08:17:31 -04:00
Chris PeBenito 1d51a2f4c4 Module version bump for APR build script labeling from Luis Ressel. 2015-08-11 08:46:41 -04:00
Luis Ressel fd5e40b047 Mark APR build scripts as bin_t
I don't know why those are in /usr/share/build-1/ instead of
/usr/share/apr-0/build/ here, but it doesn't appear to be
Gentoo-specific.
2015-08-11 08:42:25 -04:00
Chris PeBenito 459a19f18d Module version bump for debufs mount point fc entry from Laurent Bigonville. 2015-05-06 09:50:14 -04:00
Laurent Bigonville c738343b7f Add fc for /sys/kernel/debug as debugfs_t 2015-05-06 09:49:40 -04:00
Chris PeBenito f963d6dafa Fix domain_mmap_low() to be a proper tunable. 2015-02-09 16:02:36 -05:00
Chris PeBenito 468185f5f7 Bump module versions for release. 2014-12-03 13:37:38 -05:00
Chris PeBenito 0735f2ca4a Module version bump for misc fixes from Sven Vermeulen. 2014-12-02 10:29:59 -05:00
Sven Vermeulen 84fa2ab1f2 Mark f2fs as a SELinux capable file system
Since Linux kernel 3.11, F2FS supports XATTR and the security namespace.
See commit
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8ae8f1627f39bae505b90cade50cd8a911b8bda6
2014-12-02 09:16:05 -05:00
Sven Vermeulen 29292968fe xfce4-notifyd is an executable 2014-12-02 09:16:05 -05:00
Chris PeBenito 6624f9cf7a Drop RHEL4 and RHEL5 support. 2014-09-24 13:10:37 -04:00
Chris PeBenito e4cbb09a3d Module version bumps for systemd/journald patches from Nicolas Iooss. 2014-09-12 11:30:05 -04:00
Nicolas Iooss 3a7e30c22d Allow journald to read the kernel ring buffer and to use /dev/kmsg
audit.log shows that journald needs to read the kernel read buffer:

    avc:  denied  { syslog_read } for  pid=147 comm="systemd-journal" scontext=system_u:system_r:syslogd_t tcontext=system_u:system_r:kernel_t tclass=system permissive=1

Moreover journald uses RW access to /dev/kmsg, according to its code:
http://cgit.freedesktop.org/systemd/systemd/tree/src/journal/journald-kmsg.c?id=v215#n394
2014-09-12 09:52:18 -04:00
Chris PeBenito 1743984baf Module version bump for misc fixes from Nicolas Iooss. 2014-08-26 09:14:44 -04:00
Nicolas Iooss d3092fc059 Fix typo in fs_getattr_all_fs description 2014-08-26 09:07:53 -04:00
Nicolas Iooss 7487f355dd Label (/var)?/tmp/systemd-private-.../tmp like /tmp
Such directories are used by systemd as private mountpoints for
services.
2014-08-26 08:22:53 -04:00
Nicolas Iooss 28658963c3 Label /usr/lib/networkmanager/ like /usr/lib/NetworkManager/
On ArchLinux the directory name of Network Manager in /usr/lib is
written in lowercase but not the files in /usr/bin, /var/lib, etc.

While at it, remove a useless backslash before a minus character.
2014-08-26 08:08:41 -04:00
Chris PeBenito 617466b2bd Module version bump for losetup fixes from Luis Ressel. 2014-08-19 08:45:38 -04:00
Luis Ressel 9946965a53 Add neccessary permissions for losetup
This allows losetup to bind mount_loopback_t files to loop devices.
2014-08-18 15:24:46 -04:00
Chris PeBenito 2b621e2c09 Module version bump for full IRC ports from Luis Ressel. 2014-08-18 15:21:49 -04:00
Luis Ressel 43d6b26963 kernel/corenetwork.te: Add all registered IRC ports
IANA has registered 6665-9/tcp and 6697 for IRC.
2014-08-18 14:01:26 -04:00
Chris PeBenito b383c8075e Module version bump for missing unlabeled interfaces from Sven Vermeulen. 2014-08-14 15:49:59 -04:00