Commit Graph

1714 Commits

Author SHA1 Message Date
Sven Vermeulen 8e678aa594 Use substititions for /usr/local/lib and /etc/init.d
Introduce the substitutions for the /usr/local/lib* locations (towards /usr/lib)
and /etc/init.d (towards /etc/rc.d/init.d).

Update the file contexts of the translated locations.

Rebased (collided with Guido's patch for commenting within the
file_contexts.subs_dist file) since v3.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-08-15 10:30:25 -04:00
Chris PeBenito 695500bfec Update contrib. 2012-08-14 09:41:26 -04:00
Chris PeBenito 66452a8ed7 Module version bump for udev binary location update from Sven Vermeulen. 2012-08-08 09:30:36 -04:00
Chris PeBenito 3fa8477732 Minor whitespace fix in udev.fc 2012-08-08 09:30:09 -04:00
Sven Vermeulen 31f772cb7a New location for udevd binary
Recent udev installs its main binary in /usr/lib/systemd (called systemd-udevd).
Update file contexts to support this.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-08-08 09:29:27 -04:00
Chris PeBenito 8c9a1703a7 Add bird contrib module from Dominick Grift. 2012-08-08 09:27:26 -04:00
Chris PeBenito b70d528401 Mcelog update from Guido Trentalancia. 2012-08-08 08:44:07 -04:00
Chris PeBenito 3516535aa6 Bump module versions for release. 2012-07-25 14:33:06 -04:00
Chris PeBenito 81761270b1 Update contrib. 2012-07-24 09:21:46 -04:00
Chris PeBenito 36d6797363 Module version bump and changelog for udev and init changes to support /run, from Sven Vermeulen. 2012-07-24 09:11:14 -04:00
Chris PeBenito 61c65fe602 Rearrange interfaces in files.if and udev.if. 2012-07-24 08:55:52 -04:00
Chris PeBenito bd4ea4cdc0 Whitespace fixes in udev.if. 2012-07-24 08:52:21 -04:00
Sven Vermeulen dfccb1658f Allow init scripts to create and manage (udev) /run location
With udev now using /run for its data, the init script responsible for preparing
the environment to start up udev needs to be able to setup this location as
well.

We here allow init scripts to create the /run/udev location (transitioning to
udev_var_run_t) and manage this content (creating the /run/udev subdirectories).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-07-24 08:42:36 -04:00
Sven Vermeulen 486e700352 Prepare udev interfaces for /run usage
Recent udev implementations now use /run (actually, /run/udev) for storing
database files, rules and more. Hence, we need to extend existing interfaces to
support searching through the udev_var_run_t location (as most of that was
previously only in device_t and/or etc_t or udev_etc_t)

Next to enhancing the interfaces, we provide additional ones that will be used
by the init script (for udev) which needs to create and support the new
/run/udev locations.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-07-24 08:42:31 -04:00
Sven Vermeulen b2207b335f Allow init scripts to populate /run location
At boot up, the /run location is empty, and init scripts are responsible for
creating the necessary structure within to support their services. This means,
adding entries like for the lock folder (/run/lock).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-07-24 08:42:28 -04:00
Sven Vermeulen 765e7b71ee Supporting interfaces for the /run changes
Since most distributions now support /run (which, thanks the the
file context substitutions, is marked as var_run_t), we need to update the
SELinux policies to support "dynamically" building up /run. Unlike /var/run,
which is most likely statically defined during distribution installation, /run
is a tmpfs which is built up from scratch on each and every boot.

But not only that, many services also use this location for other purposes than
just PID files (which is to be expected as these "other reasons" is why /run
came to be in the first place), so we need to support other types within this
location easily.

For this reason, we introduce support to
- creating the /run/lock location
- supporting named file transitions when init scripts create stuff in /run

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-07-24 08:42:10 -04:00
Sven Vermeulen ec3995c576 Support log location for init script logging
Recent init script packages allow for logging init script progress (service
start/stop state information, sometimes even duration, etc.) so we introduce an
initrc_var_log_t logtype and allow initrc_t to manage this.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-07-24 08:40:09 -04:00
Chris PeBenito 2728d43634 Module version bump, changelog, pull contrib 2012-07-10 08:58:37 -04:00
Chris PeBenito b35c647481 nss_domain attribute patch 3, Miroslav Grepl 2012-07-10 08:43:38 -04:00
Chris PeBenito 330b13a4a2 nss_domain attribute patch 1, Miroslav Grepl 2012-07-10 08:43:31 -04:00
Chris PeBenito b4cbbb1fd8 Allow mount to write to all of its runtime files, from Guido Trentalancia
Allow mount to write not only to /etc/mtab but also to the /etc/mtab~[0-9]\{0,20\}
lock files (the number corresponds to the PID). Such files are still mistakenly
being labelled as etc_t instead of etc_runtime_t (thus preventing the successful
completion of the write operation and the accumulation of unremovable stale lock
files over several operation attempts as in normal system reboots, for example).

Do the same with the standard mount temporary file /etc/mtab.tmp.

The above refers to mount from util-linux-2.21.2 from kernel.org. See mount -vvv
for the location of such files.
2012-06-26 09:51:57 -04:00
Chris PeBenito f825edc28a Module version bump and changelog for sepostgresql updates. 2012-05-18 14:18:51 -04:00
Chris PeBenito 32e0f50cf7 Rearrange lines in postgresql. 2012-05-18 14:18:00 -04:00
Chris PeBenito c5114fef5e SEPostgresql changes from Kohei KaiGai.
* fix bugs in MLS/MCS
* add connection pooling server support
* foreign data wrapper support
* Add temporary objects support
* redefinition of use permission onto system objects
2012-05-18 09:28:18 -04:00
Chris PeBenito 00dc68d969 Module version bump for shadow utils updates from Sven Vermeulen. 2012-05-11 11:46:26 -04:00
Sven Vermeulen 2f28a01206 Allow groupadd/passwd to read selinux config and context files
Recent shadow utils require listing of SELinux config as well as read the file context information.

See also
- https://bugs.gentoo.org/show_bug.cgi?id=413061
- https://bugs.gentoo.org/show_bug.cgi?id=413065

Changes since v1
- use correct domain (passwd_t)

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-11 08:50:38 -04:00
Chris PeBenito 8e00a439ef Module verion bump for simplify file contexts based on file context path substitutions, from Sven Vermeulen. 2012-05-10 10:36:06 -04:00
Chris PeBenito aac94b0e40 Whitespace fixes from fc.subs changes. 2012-05-10 10:33:54 -04:00
Chris PeBenito 41ff913f44 Remove duplicate fc definition for firefox. 2012-05-10 10:33:30 -04:00
Sven Vermeulen b55726771e Simplify .fc in light of file_contexts.subs_dist
Now that we have file_contexts.subs_dist, translations that were put in the file context definition files can now be
cleaned up.

Differences from v1:
- removes a few duplicate entries in the libraries.fc file, and
- removes the contrib references

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-10 10:09:00 -04:00
Chris PeBenito 4f24b1841c Add optional name for kernel and system filetrans interfaces. 2012-05-10 09:53:45 -04:00
Chris PeBenito bc1b68393f Update contrib. 2012-05-10 08:38:14 -04:00
Chris PeBenito 278ac79c08 Module version bump for http_cache port update from Sven Vermeulen. 2012-05-04 11:20:33 -04:00
Sven Vermeulen d36c428425 Mark tcp:3128 as http_cache_port_t
Port 3128 is the default port for squid cache

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-04 11:15:59 -04:00
Chris PeBenito 7b6fe9c1a5 Module version bump for syslog-ng and lvm patches from Sven Vermeulen. 2012-05-04 10:49:11 -04:00
Sven Vermeulen ee62c91345 Recent lvm utilities now use setfscreate
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-04 10:45:57 -04:00
Sven Vermeulen 1c5de3ddf5 Allow getsched for syslog-ng
Recent syslog-ng implementation uses a threading library that requires the getsched permission.

See also https://bugs.gentoo.org/show_bug.cgi?id=405425

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-04 10:40:05 -04:00
Chris PeBenito b72101a116 Module version bump and changelog for non-auth file attribute to eliminate set expressions, from James Carter. 2012-05-04 09:14:00 -04:00
Chris PeBenito 4f8e1a4e3d Rearrange a few files interfaces. 2012-05-04 09:13:11 -04:00
Chris PeBenito e7ed5a1fe9 Whitespace fixes in files.if. 2012-05-04 09:00:33 -04:00
James Carter 624e73955d Changed non-contrib policy to use the new non_auth_file_type interfaces
Replaced calls to interfaces allowing access to all files except
auth_file_type files with calls to interfaces allowing access to
non_auth_file_type files.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
2012-05-04 08:47:49 -04:00
James Carter 8959338324 Change interfaces in authlogin.if to use new interfaces in files.if
Changed all interfaces that used auth_file_type to call the new
corresponding interface in files.if.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
2012-05-04 08:47:42 -04:00
James Carter 709fd365b8 Create non_auth_file_type attribute and interfaces
Reduce the binary policy size by eliminating some set expressions
related to file accesses and make Repolicy easier to convert into CIL.
- Moved the auth_file_type attribute.
- Created a new type attribute called non_auth_file_type.
- Created new interfaces to allow file accesses on non_auth_file_type
files.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
2012-05-04 08:47:37 -04:00
Chris PeBenito 9b0b33ac4c Update contrib. 2012-05-04 08:43:41 -04:00
Chris PeBenito a9cd7ff45f Module version bump for patches from Sven Vermeulen.
* Dontaudit in xserver
* Create user keys in sudo
2012-05-04 08:43:27 -04:00
Chris PeBenito a5fc78b88a Move domain call in xserver. 2012-05-04 08:35:24 -04:00
Sven Vermeulen d5a23304c3 Adding dontaudits for xserver
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-04 08:34:32 -04:00
Sven Vermeulen 1fe3d0929e sudo with SELinux support requires key handling
When using sudo with SELinux integrated support, the sudo domains need to be able to create user keys. Without this
privilege, any command invoked like "sudo /etc/init.d/local status" will run within the sudo domain (sysadm_sudo_t)
instead of the sysadm_t domain (or whatever domain is mentioned in the sudoers file).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-04 08:30:28 -04:00
Chris PeBenito 2e83467903 Module version bump and changelog for virt updates from Sven Vermeulen. 2012-04-23 10:43:15 -04:00
Sven Vermeulen e842434336 Calling virsh requires stream_connect rights towards virt
When virsh is used to manage the virtual guests, the parent domain requires stream_connect rights towards the virtd_t
domain. This patch adds it in for initrc_t (for init scripts managing the environment) and sysadm_t (system
administrator).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-04-23 10:22:55 -04:00