Commit Graph

3620 Commits

Author SHA1 Message Date
Chris PeBenito 3991ecf54f Merge branch 'acpid_shutdown' of https://github.com/jpds/refpolicy into jpds-acpid_shutdown 2020-08-26 12:49:14 -07:00
Jonathan Davies 99ad371868 acpi.te: Removed unnecessary init_write_initctl().
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2020-08-25 22:53:40 +00:00
Christian Göttsche 850fefc626 postfixpolicyd: split multi-class rule
The rule uses the permission manage_file_perms on the classes file and
sock_file.  This won't result in a change in the actual policy
generated, but if the definitions of macros are changed going forward,
the mismatches could cause issues.

Found by SELint

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2020-08-25 20:44:16 +02:00
Jonathan Davies ec0ebc8b11 acpi.te: Allow acpid_t to shutdown the system - this is required to handle shutdown calls from libvirt. Fixes #298.
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2020-08-23 20:00:29 +00:00
Chris PeBenito d387e79989 Bump module versions for release.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-08-18 09:09:10 -04:00
Chris PeBenito ab47695bdb files, init, modutils, systemd, udev: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-08-14 09:38:09 -04:00
Chris PeBenito e10d956f38 Merge pull request #294 from cgzones/selint 2020-08-14 09:36:44 -04:00
Chris PeBenito 60516aaeaa xserver: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-08-14 08:53:38 -04:00
Yi Zhao afb2021524 xserver: allow xserver_t to connect to resmgrd
This was probably a typo:
resmgr_stream_connect(xdm_t) -> resmgr_stream_connect(xserver_t)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2020-08-14 11:13:34 +08:00
Yi Zhao 8322f0e0d9 Remove duplicated rules
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2020-08-14 10:55:31 +08:00
Christian Göttsche 09ed84b632 files/modutils: unify modules_object_t usage into files module
modutils.te:         50: (W): No explicit declaration for modules_object_t from module files.  You should access it via interface call or use a require block. (W-001)
modutils.te:         51: (W): No explicit declaration for modules_object_t from module files.  You should access it via interface call or use a require block. (W-001)
modutils.te:         52: (W): No explicit declaration for modules_object_t from module files.  You should access it via interface call or use a require block. (W-001)
modutils.te:         53: (W): No explicit declaration for modules_object_t from module files.  You should access it via interface call or use a require block. (W-001)
modutils.if:         15: (W): Definition of declared type modules_object_t not found in own module, but in module files (W-011)
modutils.if:         52: (W): Definition of declared type modules_object_t not found in own module, but in module files (W-011)
modutils.fc:         24: (S): Type modules_object_t is declared in module files, but used in file context here. (S-002)

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2020-08-13 21:23:43 +02:00
Christian Göttsche e9b2e1ea4f work on SELint issues
- selinuxutil.te: ignore gen_require usage for bool secure_mode
- corenetwork.te: ignore gen_require usage for type unlabeled_t
- files.if: drop unneeded required types in interface
- rpm.if: drop unneeded required type in interface
- xserver.if: ignore interface xserver_restricted_role calling template xserver_common_x_domain_template
- domain.te: add require block with explicit declaration for used type unlabeled_t from module kernel

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2020-08-13 21:23:43 +02:00
Chris PeBenito fbc60f2319
Merge pull request #296 from cgzones/diff-check
whitespace cleanup
2020-08-13 09:19:48 -04:00
Christian Göttsche 72b2c66256 whitespace cleanup
Remove trailing white spaces and mixed up indents

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2020-08-13 14:34:57 +02:00
Christian Göttsche 3bb507efa6 Fix several misspellings
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2020-08-13 14:08:58 +02:00
Chris PeBenito 71e653980b various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-08-11 08:35:00 -04:00
Chris PeBenito cd141fa2ea Merge pull request #290 from pebenito/fs-image 2020-08-11 08:33:26 -04:00
Chris PeBenito 32b2332d36 Merge pull request #289 from pebenito/remove-unlabeled-file 2020-08-11 08:33:22 -04:00
Chris PeBenito 777fe47c19 kernel, fstools, lvm, mount: Update to use filesystem image interfaces.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-07-29 14:33:39 -04:00
Chris PeBenito 04fb9404c8 filesystem: Create a filesystem image concept.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-07-29 14:29:26 -04:00
Chris PeBenito 27deadbecd files: Restore mounton access to files_mounton_all_mountpoints().
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-07-28 10:33:09 -04:00
Chris PeBenito fe737c405d selinuxuntil, userdomain: Restore relabelfrom access for unlabeled files.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-07-28 10:33:07 -04:00
Chris PeBenito 662d55ed5e kernel: Drop unlabeled_t as a files_mountpoint().
This made unlabeled_t a file and provided much more access than an
unlabeled file should have.  Access to unlabeled objects should be
explicit.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-07-28 10:09:24 -04:00
Chris PeBenito 4c7926a3c0 init: Revise init_startstop_service() build option blocks.
Revise to use ifelse to have a clear set of criteria for enabling the
various options.  Additionally, if no options are enabled, run_init
permissions are provided as a default.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2020-07-27 11:40:36 -04:00
Chris PeBenito aa6c3f4da3 apt, rpm: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-07-27 09:05:53 -04:00
Laurent Bigonville e4f0709788 Label /usr/libexec/packagekitd as apt_exec_t on debian
The daemon has now moved from /usr/lib/packagekit/packagekitd to
/usr/libexec/packagekitd

Signed-off-by: Laurent Bigonville <bigon@bigon.be>
2020-07-27 13:26:06 +02:00
Chris PeBenito c5ac0d52c4 openvpn: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-07-16 09:31:56 -04:00
Chris PeBenito 7f601b8bcf Merge pull request #284 from alexminder/openvpn 2020-07-16 09:31:06 -04:00
Alexander Miroshnichenko 67c4238e8e openvpn: update file context regex for ipp.txt
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
2020-07-14 13:34:58 +03:00
Chris PeBenito ac02273502 tmp2: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-07-10 08:51:57 -04:00
Alexander Miroshnichenko aff9c6e91c openvpn: more versatile file context regex for ipp.txt
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
2020-07-07 15:22:29 +03:00
Dave Sugar 7a03f4a00f Interfaces for tpm2
Add interfaces tpm2_use_fds, tpm2_dontaudit_use_fds, and tpm2_read_pipes

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2020-07-06 22:34:39 -04:00
Chris PeBenito 613708cad6 various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-07-04 09:30:45 -04:00
Chris PeBenito 0992763548 Update callers for "pid" to "runtime" interface rename.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-06-28 16:03:45 -04:00
Chris PeBenito be04bb3e7e Rename "pid" interfaces to "runtime" interfaces.
Rename interfaces to bring consistency with previous pid->runtime type
renaming.  See PR #106 or 69a403cd original type renaming.

Interfaces that are still in use were renamed with a compatibility
interface.  Unused interfaces were fully deprecated for removal.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-06-28 14:33:17 -04:00
Chris PeBenito 07c08fa41e kernel: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-06-18 08:30:42 -04:00
Dave Sugar 50c24ca481 Resolve neverallow failure introduced in #273
Signed-off-by: Dave Sugar <dsugar@tresys.com>
2020-06-17 19:05:08 -04:00
Chris PeBenito c63e5410a9 systemd: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-06-17 08:48:41 -04:00
Chris PeBenito c2a142d762 systemd: Merge generator domains.
If these processes are compromised they can write units to do malicious
actions, so trying to tightly protect the resources for each generator
is not effective.

Made the fstools_exec() optional, although it is unlikely that a system
would not have the module.

Only aliases for removed types in previous releases are added.  The
systemd_unit_generator() interface and systemd_generator_type attribute
were not released and are dropped without deprecation.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-06-15 09:47:20 -04:00
Chris PeBenito 71002cdfe0 various: Module version bump.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-06-15 08:57:44 -04:00
Chris PeBenito 91087f8ff1 Merge pull request #274 from bauen1/remove-dead-weight 2020-06-15 08:56:42 -04:00
Chris PeBenito 9169113d42 Merge pull request #271 from bauen1/misc-fixes-2 2020-06-15 08:56:40 -04:00
Chris PeBenito edbe7e9af7 Merge pull request #267 from bauen1/target-systemd-sysusers 2020-06-15 08:56:24 -04:00
bauen1 fc904634ac
dpkg: domaintrans to sysusers if necessary
Signed-off-by: bauen1 <j2468h@gmail.com>
2020-06-15 14:52:53 +02:00
bauen1 77f891c7bf
Remove the ada module, it is unecessary and not touched since ~2008
It is only used to allow the compiler execmem / execstack but we have
unconfined_execmem_t for that.

Signed-off-by: bauen1 <j2468h@gmail.com>
2020-06-15 14:47:14 +02:00
bauen1 cbdf1fad22
systemd: systemd-tempfiles will relabel tmpfs if mounted over e.g. /tmp
Signed-off-by: bauen1 <j2468h@gmail.com>
2020-06-15 14:45:07 +02:00
bauen1 e12d84181b
corecommands: correct label for debian ssh-agent helper script
Signed-off-by: bauen1 <j2468h@gmail.com>
2020-06-15 14:45:07 +02:00
bauen1 cb2d84b0d1
gpg: don't allow gpg-agent to read /proc/kcore
This was probably a typo and shouldn't have been merged.

Signed-off-by: bauen1 <j2468h@gmail.com>
2020-06-15 14:45:07 +02:00
bauen1 083e5d1d58
dpkg: dpkg scripts are part of dpkg and therefor also an application domain
Signed-off-by: bauen1 <j2468h@gmail.com>
2020-06-15 14:45:07 +02:00
bauen1 583f435c7b
systemd: systemd --user add essential permissions
Allow selinux awareness (libselinux) and access to setsockcreatecon to
correctly set the label of sockets.

Signed-off-by: bauen1 <j2468h@gmail.com>
2020-06-15 14:45:07 +02:00