Commit Graph

2427 Commits

Author SHA1 Message Date
Guido Trentalancia 3c6530cbdd udev: always enable kernel module loading
The udev daemon should be able to load kernel modules not only on
systems using systemd but also on systems using former versions of
the udev daemon.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-18 17:39:52 -05:00
Guido Trentalancia 89c838db66 udev: manage tmpfs files and directories
Update the udev module so that the udev domain can manage tmpfs files
and directories.

Thanks to Christian Göttsche for pointing out that this only applies
to systems not using systemd (v2).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-18 17:39:33 -05:00
Chris PeBenito 6e3c5476ca Module version bumps for patches from Guido Trentalancia. 2016-12-17 09:00:36 -05:00
Guido Trentalancia f5988ced5f userdomain: separate optional conditionals for gnome and wm role templates
Since the window managers are not limited by gnome-shell, the
userdomain module is modified by this patch in order to use
separate optional conditionals for the gnome and wm role templates.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-17 08:15:18 -05:00
Guido Trentalancia 20e8fb4b9c wm: update the window manager (wm) module and enable its role template (v7)
Enable the window manager role (wm contrib module) and update
the module to work with gnome-shell.

This patch requires the following recently posted patch for the
games module:

[PATCH v3 1/2] games: general update and improved pulseaudio integration
http://oss.tresys.com/pipermail/refpolicy/2016-December/008679.html

This patch has received some testing with the following two
configurations:
- gnome-shell executing in normal mode (with display managers
other than gdm, such as xdm from XOrg);
- gnome-shell executing in gdm mode (with the Gnome Display
Manager).

Patches 3/5, 4/5 and 5/5 are needed when gnome-shell is used
in conjunction with gdm.

Since the window managers are not limited by gnome-shell, this latter
version of the patch (along with part 2/5) uses separate optional
conditionals for the gnome and wm role templates.

The new wm_application_domain() interface introduced in the sixth
version of this patch is an idea of Jason Zaman.

This patch also fixes a minor bug in the way the pulseaudio_role()
interface is optionally included by the role templates (pulseaudio
does not depend on dbus).

This seventh version splits the 1/5 patch in two separate patches:
one for the base policy and one for the contrib policy.

THIS IS THE BASE POLICY PART.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-17 08:15:10 -05:00
Chris PeBenito 898ec0e24e Module version bump for xserver patch from Guido Trentalancia. 2016-12-15 19:29:12 -05:00
Guido Trentalancia edf4f0a313 authlogin: indentation/whitespace fix
Indentation/whitespace fix for one authlogin interface.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-15 19:19:17 -05:00
Guido Trentalancia dbd988ac99 xserver: enable dbus messaging with devicekit power
Enable messaging over dbus between devicekit power and the X
Display Manager (XDM) domains.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-15 19:18:41 -05:00
Chris PeBenito 950fc2cd7e Module version bump for netutils patch from Luis Ressel. 2016-12-11 14:59:14 -05:00
Luis Ressel d73a8bb52c netutils: Label iptstate as netutils_t
>From the package description: "IP Tables State displays states being kept
by iptables in a top-like format". The netutils_t permission set fits it
snugly.
2016-12-11 14:58:35 -05:00
Chris PeBenito e972582ad5 Update contrib. 2016-12-08 18:46:30 -05: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
Chris PeBenito 1113e38307 Module version bumps for openoffice patches from Guido Trentalancia. 2016-12-06 20:19:18 -05:00
Guido Trentalancia ab0b758ed7 Apache OpenOffice module (base policy part)
This is a patch that I have created and tested to support Apache
OpenOffice with its own module (base policy part, 1/2).

The file contexts (and initial tests) are based on the default
installation path for version 4 of the office suite.

Since the second version it includes revisions from Dominick Grift.

Since the third version it should correctly manage files in home
directories and allow some other major functionality.

The fourth version of the patch introduces a boolean to enable or
disable software updates from the network (application and/or
extensions).

The fifth version of the patch adds the ability to connect to the
X display manager (XDM) using Unix domain sockets (interface
xserver_stream_connect_xdm()). Also the fifth version splits the
whole patch into separate base policy / contrib policy patches as
required.

The sixth version of this patch removes obsolete executable
permission from the unconfined module.

The seventh, eighth and nineth versions brings no changes in the base
part of the patch.

All released versions are safe to apply, each new version just
brings improved application functionality and better integration
with other desktop applications.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-06 20:08:06 -05:00
Chris PeBenito 33f21bcc21 modutils: Move lines. 2016-12-06 20:01:22 -05:00
Luis Ressel 85166aad1a system/modutils: Add kernel_search_key(kmod_t)
This permission is currently granted in an ifdef(systemd) block, but
it's also required on non-systemd systems if signed kernel modules are
being used.
2016-12-06 20:00:59 -05:00
Chris PeBenito 4992fcf5cd Merge pull request #57 from cgzones/trailing_whitespaces
remove trailing whitespaces
2016-12-06 19:56:32 -05:00
Chris PeBenito d73cd61952 Module version bump for journald fixes from cgzones. 2016-12-06 19:52:42 -05:00
Chris PeBenito 445b5d543e Merge branch 'syslogd' of git://github.com/cgzones/refpolicy 2016-12-06 19:51:28 -05:00
cgzones d8cb498284 remove trailing whitespaces 2016-12-06 13:45:13 +01:00
cgzones c1fa5e55ab fix syslogd audits 2016-12-04 23:09:49 +01:00
Chris PeBenito 0d11ccb87b Update contrib. 2016-12-04 13:31:04 -05:00
Chris PeBenito 16b7b5573b Module version bumps for patches from cgzones. 2016-12-04 13:30:54 -05:00
Chris PeBenito 2e54596b8b Merge branch 'dhcp_avahi' of https://github.com/cgzones/refpolicy 2016-12-04 13:17:21 -05:00
cgzones 598700325b allow dhcp_t to domtrans into avahi
#============= dhcpc_t ==============
# audit(1459860992.664:6):
#  scontext="system_u:system_r:dhcpc_t:s0" tcontext="system_u:object_r:avahi_exec_t:s0"
#  class="file" perms="execute_no_trans"
#  comm="dhclient-script" exe="" path=""
#  message="/var/log/syslog.2.gz:Apr  5 14:56:32 debianSe kernel: [    4.830761]
#   audit: type=1400 audit(1459860992.664:6): avc:  denied  { execute_no_trans }
#   for  pid=412 comm="dhclient-script" path="/usr/sbin/avahi-autoipd" dev="sda1"
#   ino=140521 scontext=system_u:system_r:dhcpc_t:s0
#   tcontext=system_u:object_r:avahi_exec_t:s0 tclass=file permissive=1 "
# audit(1454514879.616:134):
#  scontext="system_u:system_r:dhcpc_t:s0" tcontext="system_u:object_r:avahi_exec_t:s0"
#  class="file" perms="execute_no_trans"
#  comm="dhclient-script" exe="" path=""
#  message="/var/log/syslog.5.gz:Feb  3 16:54:39 debianSe kernel: [   13.237496]
#   audit: type=1400 audit(1454514879.616:134): avc:  denied  { execute_no_trans
#   } for  pid=464 comm="dhclient-script" path="/usr/sbin/avahi-autoipd"
#   dev="sda1" ino=140521 scontext=system_u:system_r:dhcpc_t
#   tcontext=system_u:object_r:avahi_exec_t tclass=file permissive=1 "
allow dhcpc_t avahi_exec_t:file execute_no_trans;
# audit(1459860992.660:4):
#  scontext="system_u:system_r:dhcpc_t:s0" tcontext="system_u:object_r:avahi_exec_t:s0"
#  class="file" perms="execute"
#  comm="dhclient-script" exe="" path=""
#  message="/var/log/syslog.2.gz:Apr  5 14:56:32 debianSe kernel: [    4.827312]
#   audit: type=1400 audit(1459860992.660:4): avc:  denied  { execute } for
#   pid=412 comm="dhclient-script" name="avahi-autoipd" dev="sda1" ino=140521
#   scontext=system_u:system_r:dhcpc_t:s0
#   tcontext=system_u:object_r:avahi_exec_t:s0 tclass=file permissive=1 "
# audit(1459860992.664:5):
#  scontext="system_u:system_r:dhcpc_t:s0" tcontext="system_u:object_r:avahi_exec_t:s0"
#  class="file" perms="{ read open }"
#  comm="dhclient-script" exe="" path=""
#  message="/var/log/syslog.2.gz:Apr  5 14:56:32 debianSe kernel: [    4.829009]
#   audit: type=1400 audit(1459860992.664:5): avc:  denied  { read open } for
#   pid=412 comm="dhclient-script" path="/usr/sbin/avahi-autoipd" dev="sda1"
#   ino=140521 scontext=system_u:system_r:dhcpc_t:s0
#   tcontext=system_u:object_r:avahi_exec_t:s0 tclass=file permissive=1 "
# audit(1454514879.616:132):
#  scontext="system_u:system_r:dhcpc_t:s0" tcontext="system_u:object_r:avahi_exec_t:s0"
#  class="file" perms="execute"
#  comm="dhclient-script" exe="" path=""
#  message="/var/log/syslog.5.gz:Feb  3 16:54:39 debianSe kernel: [   13.237297]
#   audit: type=1400 audit(1454514879.616:132): avc:  denied  { execute } for
#   pid=464 comm="dhclient-script" name="avahi-autoipd" dev="sda1" ino=140521
#   scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:avahi_exec_t
#   tclass=file permissive=1 "
# audit(1454514879.616:133):
#  scontext="system_u:system_r:dhcpc_t:s0" tcontext="system_u:object_r:avahi_exec_t:s0"
#  class="file" perms="{ read open }"
#  comm="dhclient-script" exe="" path=""
#  message="/var/log/syslog.5.gz:Feb  3 16:54:39 debianSe kernel: [   13.237309]
#   audit: type=1400 audit(1454514879.616:133): avc:  denied  { read open } for
#   pid=464 comm="dhclient-script" path="/usr/sbin/avahi-autoipd" dev="sda1"
#   ino=140521 scontext=system_u:system_r:dhcpc_t
#   tcontext=system_u:object_r:avahi_exec_t tclass=file permissive=1 "
#!!!! This avc is allowed in the current policy
allow dhcpc_t avahi_exec_t:file { read execute open };
2016-12-04 17:34:11 +01:00
cgzones c25dcdc889 define filecontext for /run/agetty.reload 2016-12-04 17:29:17 +01:00
Chris PeBenito db06838142 Module version bump for xserver changes from Guido Trentalancia. 2016-12-04 09:11:02 -05:00
Chris PeBenito 4aa4a3d10b xserver: Rearrange lines 2016-12-04 09:10:25 -05:00
Guido Trentalancia 58e5ce24ae xserver: remove unneeded user content permissions
Remove unneeded permissions to read user content from the
xserver module (xserver and xdm domains).

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-04 08:57:24 -05:00
Chris PeBenito cccc369d57 Merge pull request #50 from cgzones/macros
update policy/support macros
2016-12-03 17:23:11 -05:00
Chris PeBenito da94647e7f Update contrib. 2016-12-01 19:45:14 -05:00
Chris PeBenito 2fe9c4017e Module version bump for xserver patch from Guido Trentalancia 2016-12-01 19:45:14 -05:00
Guido Trentalancia 8e977d59f2 xserver: remove unneeded user content permissions
Remove unneeded permissions to read user content from the
xserver module.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-01 19:45:14 -05:00
cgzones 901a905cbb update policy/support macros
- add systemd service macro sets
- add some documentation
- add some recursion to some macro sets (ipv perm, object class sets)
- deprecate domain_trans and domain_auto_trans
- remove unpriv_socket_class_set
2016-12-01 19:38:14 +01:00
Chris PeBenito 59d285d23d Update contrib. 2016-11-22 22:19:20 -05:00
Chris PeBenito c667be7be5 Update contrib. 2016-10-30 14:31:56 -04: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 bf5f1853f3 Let unprivileged users list mounted filesystems
Let unprivileged users list filesystems mounted on mount points such
as /mnt (cdrom, FAT, NTFS and so on).

This makes a great difference to the usability and effectiveness of
graphical filesystem browsers such as Gnome Nautilus and currently
comes at no security penalty because mounted filesystems can be
listed with programs such as the "df" program from GNU coreutils or
by simply reading /proc/mounts.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-10-30 14:25:07 -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 633ab9fea3 Update Changelog and VERSION for release. 2016-10-23 16:58:59 -04:00
Chris PeBenito 34055cae87 Bump module versions for release. 2016-10-23 16:58:59 -04:00
Chris PeBenito d9d0ff0074 Update contrib. 2016-10-19 19:02:55 -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 b96f32a1f3 Update contrib. 2016-09-27 18:31:35 -04:00
Chris PeBenito 55968a5449 Update contrib. 2016-09-18 16:41:54 -04:00
Chris PeBenito c3523f3c85 Module version bump for selinuxutil fix from Jason Zaman. 2016-09-18 16:41:47 -04:00