Commit Graph

4577 Commits

Author SHA1 Message Date
Chris PeBenito 8527b86621 Further strict systemd fixes from Russell Coker. 2017-04-20 20:00:34 -04:00
Chris PeBenito 95b584b5e9 xdm sigchld interface from Russell Coker. 2017-04-20 19:32:19 -04:00
Chris PeBenito 291f1512e3 Module version bump from fixes from Guido Trentalancia. 2017-04-20 19:19:25 -04:00
Guido Trentalancia via refpolicy 51fa34de36 xserver: fix iceauth_home_t file context creation
This patch fixes the xserver module so that the hidden .ICEauthority
file is created with the proper context (file transition).

It also optimizes a similar interface used for xauth home files.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2017-04-20 18:58:27 -04:00
Chris PeBenito e04f2d3f16 Module version bump for patch from Guido Trentalancia 2017-04-18 21:52:26 -04:00
Chris PeBenito bff3838916 corecommands: Add fc escaping for previous patch. 2017-04-18 21:51:52 -04:00
Guido Trentalancia c3dab0699b corecommands: new file contexts for Gnome applications
This patch adds three new file contexts for script executables
belonging to new Gnome applications (weather application and
sound recorder).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2017-04-18 21:46:24 -04:00
Chris PeBenito e03f6d4c61 some userdomain patches from Russell Coker
Added mono_run for unconfined and also xserver_role and allow it to dbus
chat with xdm.

Allow sysadm_t to read kmsg.

Allow user domains to dbus chat with kerneloops for the kerneloops desktop
gui.  Also allow them to chat with devicekit disk and power daemons.

Allow gconfd_t to read /var/lib/gconf/defaults and /proc/filesystems
2017-04-18 21:41:45 -04:00
Chris PeBenito 57bb7dd471 another bootloader patch from Russell Coker 2017-04-18 21:30:02 -04:00
Chris PeBenito a8a360c178 devicekit, mount, xserver, and selinuxutil from Russell Coker
Allow devicekit_power_t to chat to xdm via dbus and log via syslog.

Allow mount_t to do more with it's runtime files and stat more filesystem
types.

Allow xauth to send sigchld to xdm.

Allow semanage to search policy_src_t dirs and read /dev/urandom.
2017-04-18 21:28:16 -04:00
Chris PeBenito c2b04d1ea2 kmod, lvm, brctl patches from Russell Coker
Patches for modutils, at least one of which is needed to generate an initramfs
on Debian.

Patch to allow lvm to talk to fifos from dpkg_script_t for postinst scripts
etc.

Patch for brctl to allow it to create sysfs files.
2017-04-18 21:17:36 -04:00
Chris PeBenito 132cc4b2d5 bootloader from Russell Coker.
This patch adds a lot of policy that is needed to setup an initramfs and grub
on Debian nowadays.

Also changed a comment about ia64 to correctly mention EFI.
2017-04-18 20:56:59 -04:00
Chris PeBenito b49d85c83d misc daemons from Russell Coker.
Put in libx32 subs entries that refer to directories with fc entries.

Allow dpkg_t to transition to dpkg_script_t when it executes bin_t for
dpkg-reconfigure.

Some dontaudit rules for mta processes spawned by mon for notification.

Lots of tiny changes that are obvious.
2017-04-18 20:38:13 -04:00
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
Chris PeBenito 477d984415 systemd init from Russell Coker
This patch lets mandb_t search init_var_run_t dirs which it needs when running
with systems.  Also allows it to fs_getattr_xattr_fs() because it seemed
pointless to put that in a separate patch.

Allow init_t to do several things that it requires when init is systemd.

Allow various operations on var_log_t to access var_log_t symlinks too.

Let auditd setattr it's directory.
2017-04-16 19:08:40 -04:00
Chris PeBenito 35bcd82964 Module version bump for misc fixes from Guido Trentalancia. 2017-04-16 18:49:54 -04:00
Guido Trentalancia 69e5e0f72c userdomain: do not audit netlink socket creation attempts
Update the userdomain base module so that an unneeded permission
is not audited.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2017-04-16 18:49:54 -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
Nicolas Iooss 1a3baa342c
Synchronize file patterns for /usr/bin/mount... and /usr/sbin/mount...
mount.fc defines file contexts for /usr/bin/mount.*, /usr/bin/umount.*
and /usr/sbin/mount\.zfs. These patterns are not consistent for two
reasons:

- some distributions use /sbin/mount... for other file systems that zfs.
  For example Debian uses /sbin/mount.ntfs-3g
  (https://packages.debian.org/jessie/amd64/ntfs-3g/filelist)
- mount_exec_t type should only be applied to mount, umount, mount.$FS
  and umount.udisks2, not mountpoint.

Replace the file patterns with ones that do not match mountpoint and
match every mount and umount programs in /usr/bin and /usr/sbin.
2017-04-15 20:23:34 +02:00
Chris PeBenito 466286aa39 Merge pull request #115 from fishilico/python_raw_strings
Use raw strings in regular expressions
2017-04-08 12:47:05 -04:00
Nicolas Iooss 82e7e4e638
Use raw strings in regular expressions
Python 3.6 complains about the strings which are used as regular
expression in the support scripts:

    File "support/segenxml.py", line 37
        INTERFACE = re.compile("^\s*(interface|template)\(`(\w*)'")
                              ^
    SyntaxError: invalid escape sequence \s
2017-04-08 12:29: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 9b64397300 Merge pull request #112 from cgzones/remove_support/pyplate
clean up python3 cache on make bare
2017-04-01 20:12:49 -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
cgzones c9e77f5dde clean up python3 cache on make bare 2017-03-29 17:18:04 +02: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 066a5efbdf Merge pull request #109 from cgzones/python3
convert build scripts to python3
2017-03-27 21:47:11 -04:00
cgzones 23eec3ebd8 travis: move after_success tests into script section 2017-03-25 23:51:38 +01: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 603f0e1e6e Module version bump for monit patch from cgzones 2017-03-25 13:24:56 -04:00
Chris PeBenito 586f9e5176 Merge branch 'monit' of git://github.com/cgzones/refpolicy 2017-03-25 13:21:14 -04:00
Chris PeBenito 4dcbc032cf Module version bump from /var/run fixes from cgzones. 2017-03-25 13:05:13 -04:00
Chris PeBenito 1561ea6d42 Merge branch 'var_run' of git://github.com/cgzones/refpolicy 2017-03-25 13:03:32 -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 43f197494a dontaudit net_admin for SO_SNDBUFFORCE
The following patch adds dontaudit rules for where the net_admin capability
is requested due to SO_SNDBUFFORCE.  This forces the caller to use SO_SNDBUF
which gives the same result but possibly a smaller buffer.

From Russell Coker
2017-03-25 12:32:01 -04:00
cgzones 49580d2350 remove /var/run file context leftovers 2017-03-21 16:56:17 +01:00
cgzones 33fd9ae139 fix travis and genhomedircon 2017-03-18 18:38:20 +01:00
cgzones 3b3e6f75d3 travis: run make xml, html and install(-.*)? targets 2017-03-18 15:35:15 +01:00
Chris PeBenito dad2917f39 Module version bump for fixes from cgzones. 2017-03-18 09:14:51 -04:00
cgzones 82b0a6d4d5 convert build scripts to python3 2017-03-15 02:09:20 +01:00
Chris PeBenito 63a6a44b3d Module version bump for fixes from cgzones. 2017-03-12 16:36:49 -04:00
Chris PeBenito 2755b6e579 Merge branch 'macros' of git://github.com/cgzones/refpolicy 2017-03-12 16:15:47 -04:00
Chris PeBenito bef9b29283 Merge branch 'lvm' of git://github.com/cgzones/refpolicy 2017-03-12 15:59:26 -04:00
cgzones d62ce5b4e8 lvm: small adjustments
* align file contexts
* fix lvm_admin()
* call user_use_inherited_user_terminals and remove useless dontaudit call
2017-03-12 10:32:02 +01:00
cgzones f438513a8a sysadm: add monit admin permissions 2017-03-09 13:24:51 +01:00
cgzones da89b955a0 domtrans_pattern: use inherited fifo perms 2017-03-08 17:19:26 +01:00
cgzones d3462090d5 m4 errprint: add __program__ info 2017-03-08 17:16:27 +01:00
Chris PeBenito 4d028498d8 Module version bumps for fixes from cgzones. 2017-03-05 10:48:42 -05:00
Chris PeBenito 919a478e47 Merge branch 'fix_usr_bin_merge' of git://github.com/cgzones/refpolicy 2017-03-05 09:43:50 -05:00