Commit Graph

4004 Commits

Author SHA1 Message Date
Chris PeBenito d7acf5d3c5 Module version bump for tumblerd fc entry from Jason Zaman. 2014-06-30 15:29:25 -04:00
Chris PeBenito a3a64ffced Move tumblerd fc entry 2014-06-30 15:28:51 -04:00
Jason Zaman 724eff0b5e File Context for tumbler
Tumbler is a D-Bus service for applications to request thumbnails

Signed-off-by: Jason Zaman <jason@perfinion.com>
2014-06-30 14:38:59 -04:00
Chris PeBenito 491683b3e2 Module version bump for init_daemon_pid_file from Sven Vermeulen. 2014-06-30 14:34:51 -04:00
Sven Vermeulen 4a94489be7 Use init_daemon_pid_file instead of init_daemon_run_dir
Update non-contrib modules to use init_daemon_pid_file instead of
init_daemon_run_dir.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-26 08:34:27 -04:00
Sven Vermeulen 3cea6ac6b6 Deprecate init_daemon_run_dir interface
With init_daemon_pid_file supporting class parameters, all calls to
init_daemon_run_dir can now be transformed into init_daemon_pid_file
calls.

Update the init_daemon_run_dir interface so it gives a warning when
used, and use the init_daemon_pid_file interface underlyingly.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-26 08:34:27 -04:00
Sven Vermeulen d64826b606 Support initrc_t generated pid files with file transition
For some daemons, it is the init script that is responsible for creating
the PID file of the daemon. As we do not want to update the init SELinux
policy module for each of these situations, we need to introduce an
interface that can be called by the SELinux policy module of the caller
(the daemon domain).

The initial suggestion was to transform the init_daemon_run_dir
interface, which offers a similar approach for directories in /run, into
a class-agnostic interface. Several names have been suggested, such as
init_script_spec_run_content or init_script_generic_run_filetrans_spec,
but in the end init_daemon_pid_file was used.

The interface requires the class(es) on which the file transition should
occur, like so:

  init_daemon_pid_file(xdm_var_run_t, dir, "xdm")
  init_daemon_pid_file(postgresql_var_run_t, file, "postgresql.pid")

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-26 08:34:26 -04:00
Chris PeBenito 89fa50f67a Update contrib. 2014-06-25 11:58:02 -04:00
Chris PeBenito d31c3b4bcd Module version bump for zram fc entry from Jason Zaman. 2014-06-25 11:57:24 -04:00
Jason Zaman 860a6112de File contexts for zram
zram is a compressed block device in ram

Signed-off-by: Jason Zaman <jason@perfinion.com>
2014-06-25 10:34:45 -04:00
Chris PeBenito cc4dbc7a9b Merge pull request #1 from artyom-smirnov/master
New database object classes for database exceptions (e.g. Firebird Procedural SQL) and database datatypes.
2014-06-25 08:51:02 -04:00
Artyom Smirnov e1804807ba Renamed db_type to db_datatype, to avoid confusion with SELinux "type" 2014-06-25 16:24:33 +04:00
Artyom Smirnov fb0bedcbf8 Fixes for db_domain and db_exception
Rename db_domain to db_type
Add "use" permission to db_domain and db_type
2014-06-25 12:47:15 +04:00
Artyom Smirnov 019b439a48 New database object classes
Pair of objects which supported by Interbase/Firebird/Red Database:

db_exception - exception which can be thrown from PSQL
db_domain - named set of column attributes
2014-06-24 15:25:22 +04:00
Chris PeBenito cce73689ea Always use the unknown permissions handling build option.
This compile-time feature is in the minimum-required checkpolicy/checkmodule
for building the policy, so it should always be used.
2014-06-19 10:52:14 -04:00
Chris PeBenito 13b837fc15 Module version bump for unconfined syslog cap from Nicolas Iooss. 2014-06-09 09:29:12 -04:00
Nicolas Iooss 4067a18530 Allow unconfined domains to use syslog capability
When an unconfined_t root user runs dmesg, the kernel complains with
this message in its logs (when SELinux is in enforcing mode):

  dmesg (16289): Attempt to access syslog with CAP_SYS_ADMIN but no
  CAP_SYSLOG (deprecated).

audit.log contains following AVC:

  avc:  denied  { syslog } for  pid=16289 comm="dmesg" capability=34
  scontext=unconfined_u:unconfined_r:unconfined_t
  tcontext=unconfined_u:unconfined_r:unconfined_t tclass=capability2
2014-06-09 09:28:33 -04:00
Chris PeBenito f8a0451c7d Module version bump for dropbox port from Sven Vermeulen. 2014-06-09 08:42:26 -04:00
Sven Vermeulen c0bd1fbe5f Add dropbox_port_t support
The dropbox application has a feature called "LAN Sync" which works on
TCP & UDP port 17500. Marking this port as dropbox_port_t (instead of
the currently default unreserved_port_t) allows for more fine-grained
access control to this resource.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-09 08:35:48 -04:00
Chris PeBenito b2b750279a Module version bump for firstboot_rw_t alias removal. 2014-06-09 08:23:24 -04:00
Chris PeBenito fb51415d42 Remove firstboot_rw_t as FC5 has been gone for a long time. 2014-06-09 08:22:52 -04:00
Elia Pinto a55da23db2 Fix misspelling
Fix misspelling using  http://github.com/lyda/misspell-check

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
2014-06-09 08:21:45 -04:00
Chris PeBenito d580aae38f Module version bump for shutdown transitions from Luis Ressel. 2014-06-09 08:21:33 -04:00
Luis Ressel c55cd63011 Allow xdm_t to transition to shutdown_t domain
Several DMs offer the possibility to shutdown the system. I personally
don't think a bool is neccessary for this permission, but I wouldn't
oppose one either.
2014-06-09 08:15:57 -04:00
Luis Ressel f6352c317b Allow init to execute shutdown
In many inittabs, there's a line like
"ca:12345:ctrlaltdel:/sbin/shutdown -h now" which triggers a shutdown or
a reboot on Ctrl+Alt+Del.
2014-06-09 08:15:57 -04:00
Chris PeBenito e71df879e5 Module version bump for rcs2log and xserver updates from Sven Vermeulen. 2014-06-02 15:14:50 -04:00
Sven Vermeulen 622c11fae4 Enable rcs2log location for all distributions
Currently, the /usr/share/cvs/contrib/rcs2log is only labeled as bin_t
for redhat distributions. Moving this to the general one as it is also
in use on other distributions

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-02 11:08:17 -04:00
Sven Vermeulen 97c3e208f8 xserver_t needs to ender dirs labeled xdm_var_run_t
The LightDM application stores its xauth file in a subdirectory
(/var/run/lightdm/root) which is labeled as xdm_var_run_t. As a result,
X11 (xserver_t) needs search rights to this location.

With this setup, X is run as follows:
  /usr/bin/X :0 -auth /var/run/lightdm/root/:0

Changes since v1:
- Use read_files_pattern instead of separate allow rules

Signed-off-by: Jason Zaman <jason@perfinion.com>
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-02 11:05:01 -04:00
cgarst 9fca2d697b Updating submodule URL to github 2014-05-27 08:16:00 -07:00
Chris PeBenito ca1b69c09e Update contrib. 2014-05-27 10:03:56 -04:00
Chris PeBenito 342498065e Module version bump for deprecated interface usage removal from Nicolas Iooss. 2014-05-27 09:23:29 -04:00
Nicolas Iooss 40c155f732 No longer use deprecated MLS interfaces
Since commit 2d0c9cec mls_file_read_up and mls_file_write_down
interfaces are deprecated even though they are still present.

Replace mls_file_read_up with mls_file_read_all_levels and
mls_file_write_down with mls_file_write_all_levels.
2014-05-27 09:08:36 -04:00
Chris PeBenito 84f2b380cf Module version bump for ifconfig fc entry from Sven Vermeulen. 2014-05-27 09:08:12 -04:00
Sven Vermeulen bb3d41826b ifconfig can also be in /bin
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-05-27 08:53:55 -04:00
Chris PeBenito 5b2a2998b8 Need the __future__ import for python2 if using print(). 2014-05-13 09:39:00 -04:00
Chris PeBenito 1013c53a94 Module version bump for unconfined->lvm transition from Nicolas Iooss. 2014-05-13 08:44:26 -04:00
Nicolas Iooss 7c356f97f5 Make unconfined user run lvm programs in confined domain
When an unconfined user uses truecrypt to mount an encrypted file, dmsetup is
called to setup a new device.  This program works with udev to configure the
new device and uses SysV semaphores to synchronize states.  As udev runs
dmsetup in lvm_t domain, the first dmsetup process needs to create lvm_t
semaphores (not unconfined_t) and hence needs to run in lvm_t domain.

More details are available in the archives on the ML:
http://oss.tresys.com/pipermail/refpolicy/2014-May/007111.html
2014-05-13 08:18:47 -04:00
Nicolas Iooss 1c8c76c927 Make support/policyvers.py compatible with Python 3
Add parenthesis around print statement, like in other Python scripts.
2014-05-13 08:18:46 -04:00
Chris PeBenito eb998eed13 Fix error in default_user example. 2014-04-28 10:19:22 -04:00
Chris PeBenito 0dc377caa4 Add file for placing default_* statements. 2014-04-28 10:00:36 -04:00
Chris PeBenito 79e76afe82 Update contrib. 2014-04-24 13:01:29 -04:00
Chris PeBenito 16bc3a454f Module version bumps for fc fixes from Nicolas Iooss. 2014-04-21 10:37:44 -04:00
Nicolas Iooss 18421fc720 Label /usr/share/virtualbox/VBoxCreateUSBNode.sh as udev_helper_exec_t
VBoxCreateUSBNode.sh creates character special files in /dev/vboxusb each time
a new USB device appears.  This script is called by udev.

audit.log on a system in permissive mode before this patch contains:

    type=AVC msg=audit(1396889711.890:175): avc:  denied  { execute } for  pid=26284 comm="systemd-udevd" name="VBoxCreateUSBNode.sh" dev="sda5" ino=5899405 scontext=system_u:system_r:udev_t tcontext=unconfined_u:object_r:usr_t tclass=file
    type=AVC msg=audit(1396889711.890:175): avc:  denied  { execute_no_trans } for  pid=26284 comm="systemd-udevd" path="/usr/share/virtualbox/VBoxCreateUSBNode.sh" dev="sda5" ino=5899405 scontext=system_u:system_r:udev_t tcontext=unconfined_u:object_r:usr_t tclass=file
2014-04-21 10:15:51 -04:00
Nicolas Iooss 9427fc3ce1 Label /usr/lib/getconf as bin_t
On ArchLinux, glibc package installs /usr/bin/getconf as a hard link to a file
in /usr/lib/getconf/.  For example on a x86_64 machine:

    $ ls -i -l /usr/bin/getconf /usr/lib/getconf/XBS5_LP64_OFF64
    5900355 -rwxr-xr-x. 4 root root 22880 Feb 28 04:53 /usr/bin/getconf
    5900355 -rwxr-xr-x. 4 root root 22880 Feb 28 04:53 /usr/lib/getconf/XBS5_LP64_OFF64

Such configuration produces an instability when labeling the files with
"restorecon -Rv /":

    restorecon reset /usr/bin/getconf context unconfined_u:object_r:lib_t:s0->unconfined_u:object_r:bin_t:s0
    restorecon reset /usr/lib/getconf/XBS5_LP64_OFF64 context unconfined_u:object_r:bin_t:s0->unconfined_u:object_r:lib_t:s0

As /usr/lib/getconf directory only contains executable programs, this issue is
fixed by labeling this directory and its content "bin_t".
2014-04-21 10:15:51 -04:00
Nicolas Iooss 65551111ed filesystem: label cgroup symlinks
/sys/fs/cgroup is a tmpfs which contains cgroup mounts and symlinks such as
cpu and cpuacct.  Running restorecon makes this warning happen:

    restorecon:  Warning no default label for /sys/fs/cgroup/cpu

Declare a file context for every symlink in the cgroup tmpfs montpoint to
no longer have such warning.
2014-04-21 09:32:30 -04:00
Nicolas Iooss a102fccdba Label syslog-ng.pid as syslogd_var_run_t 2014-04-21 09:26:09 -04:00
Chris PeBenito efadd3995c Update contrib. 2014-04-21 09:24:47 -04:00
Chris PeBenito fbae5870d9 Module version bump for fixes from Laurent Bigonville. 2014-04-21 09:24:28 -04:00
Laurent Bigonville b87c815629 Allow hugetlbfs_t to be associated to /dev
Even if there is not FHS provision for this, systemd is using
/dev/hugepages to mount the hugetlbfs fs by default.

The needed file contexts are already present
2014-04-21 09:08:38 -04:00
Laurent Bigonville b963532e7c Label /etc/locale.alias as locale_t on Debian
On Debian, /usr/share/locale/locale.alias is a symlink to
/etc/locale.alias, properly label this file.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707246
2014-04-21 09:02:26 -04:00