Commit Graph

2090 Commits

Author SHA1 Message Date
Chris PeBenito
eb0dcf6f94 Whitespace fix in init.te. 2013-12-10 10:29:53 -05:00
Dominick Grift
75cca597f6 init: this is a bug in debian where tmpfs is mounted on /run, and so early on in the boot process init creates /run/utmp and /run/initctl in a tmpfs directory (/) tmpfs
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-10 10:29:53 -05:00
Dominick Grift
32d6aac409 init: for a specified automatic role transition to work. the source role must be allowed to change manually to the target role
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-10 10:29:48 -05:00
Chris PeBenito
b339b85001 Module version bump for patches from Dominick Grift. 2013-12-06 09:49:41 -05:00
Dominick Grift
8e01054f07 users: calls pulseaudio_role() for restricted xwindows users and staff_t/user_t
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-06 08:48:09 -05:00
Chris PeBenito
c7e2518162 Whitespace fix in libraries. 2013-12-06 08:48:04 -05:00
Dominick Grift
b56ecb9d52 libraries: for now i can only confirm mmap, might need to be changed to bin_t later if it turns out to need execute_no_trans
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-06 08:47:53 -05:00
Dominick Grift
e784e78825 iptables: calls to firewalld interfaces from Fedora. The firewalld_dontaudit_rw_tmp_files(iptables_t) was confirmed on Debian.
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-06 08:16:49 -05:00
Chris PeBenito
872ece4bcf Whitespace fix in usermanage. 2013-12-06 08:16:10 -05:00
Dominick Grift
6042255ede usermanage: Run /etc/cron\.daily/cracklib-runtime in the crack_t domain in Debian
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-06 08:14:29 -05:00
Chris PeBenito
3208ff94c4 Module version bump for second lot of patches from Dominick Grift. 2013-12-03 13:03:35 -05:00
Dominick Grift
1b757c65cc udev: in debian udevadm is located in /bin/udevadm
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-03 11:34:15 -05:00
Chris PeBenito
3ee649f132 Add comment in policy for lvm sysfs write. 2013-12-03 10:54:22 -05:00
Dominick Grift
6905ddaa98 lvm: lvm writes read_ahead_kb
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-03 10:53:23 -05:00
Dominick Grift
198a6b2830 udev: udevd executable location changed
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-03 10:52:44 -05:00
Chris PeBenito
613100a7f4 Whitespace fix in fstools. 2013-12-03 10:39:51 -05:00
Dominick Grift
521bbf8586 These { read write } tty_device_t chr files on boot up in Debian
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-03 10:39:21 -05:00
Chris PeBenito
ac22f3a48e setrans: needs to be able to get attributes of selinuxfs, else fails to start in Debian
Access noted by Dominick Grift.
2013-12-03 09:52:21 -05:00
Chris PeBenito
3b52b87615 Rearrage userdom_delete_user_tmpfs_files() interface. 2013-12-03 09:45:16 -05:00
Dominick Grift
b0068ace7d userdomain: add userdom_delete_user_tmpfs_files() for pulseaudio clients
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-03 09:43:51 -05:00
Chris PeBenito
f06282d1e0 Update contrib. 2013-12-03 09:34:05 -05:00
Chris PeBenito
1a01976fc4 Module version bump for first batch of patches from Dominick Grift. 2013-12-02 14:22:29 -05:00
Dominick Grift
66c6b8a9f7 unconfined: Do not domain transition to xserver_t (unconfined_t is xserver_unconfined)
It would not be sufficient in the current shape anyways because
unconfined_r is not associated with xserver_t

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:43:33 -05:00
Dominick Grift
04ac9311b9 xserver: already allowed by auth_login_pgm_domain(xdm_t)
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:43:33 -05:00
Dominick Grift
5c49af2076 kernel: cryptomgr_test (kernel_t) requests kernel to load cryptd(__driver-ecb-aes-aesni
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:43:33 -05:00
Dominick Grift
4113f7b0d4 sshd/setrans: make respective init scripts create pid dirs with proper contexts
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:43:33 -05:00
Dominick Grift
012f1b2311 sysbnetwork: dhclient searches /var/lib/ntp
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:43:32 -05:00
Dominick Grift
6c19504654 sysnetwork: dhcpc: networkmanager interface calls from Fedora. In Debian i was able to confirm the need for networkmanager_manage_lib_files(dhcpc_t) since dhclient reads /var/lib/NetworkManager/dhclient-eth0.conf
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:43:32 -05:00
Dominick Grift
3b6a8b0ee5 fstools: hdparm append (what seems inherited from devicekit ) /var/log/pm-powersave.log fstools: hdparm reads /run/pm-utils/locks/pm-powersave.lock
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:27:54 -05:00
Dominick Grift
000397b217 udev: reads modules config: /etc/modprobe.d/alsa-base-blacklist.conf
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:27:54 -05:00
Dominick Grift
e7b86e07f2 setrans: mcstransd reads filesystems file in /proc
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:27:54 -05:00
Dominick Grift
a0e88de5e5 authlogin: unix_chkpwd traverses / on sysfs device on Debian
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:27:54 -05:00
Dominick Grift
ec54e42ed9 udev: the avahi dns check script run by udev in Debian chmods /run/avahi-daemon
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:27:53 -05:00
Dominick Grift
617e504c20 udev: this fc spec does not make sense, as there is no corresponding file type transition for it
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:27:53 -05:00
Dominick Grift
76e595794b mount: fs_list_auto_mountpoint() is now redundant because autofs_t is covered by files_list_all_mountpoints()
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-02 08:27:53 -05:00
Chris PeBenito
f028029464 Update contrib. 2013-11-13 12:20:51 -05:00
Chris PeBenito
9d6546a472 Module version bumps for syslog-ng and semodule updates. 2013-11-13 09:27:21 -05:00
Chris PeBenito
9fcc6fe625 Add comments about new capabilities for syslogd_t. 2013-11-13 09:26:38 -05:00
Sven Vermeulen
b00d94fb72 Allow capabilities for syslog-ng
The syslog-ng logger has (build-optional) support for capabilities. If
capabilities support is enabled, running it without setcap/getcap
permissions gives the following upon start:

 * Starting syslog-ng ...
syslog-ng: Error setting capabilities, capability management disabled;
error='Permission denied' [ ok ]

Granting only setcap (initial AVC seen) does not fully help either:

 * Starting syslog-ng ...
 Error managing capability set, cap_set_proc returned an error;

With setcap and getcap enabled, syslog-ng starts and functions fine.

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

Reported-by: Vincent Brillault <gentoo@lerya.net>
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-11-13 09:14:34 -05:00
Sven Vermeulen
2142e6e0cc Allow semodule to create symlink in semanage_store_t
With new userspace, trying to build a SELinux policy (and load it)
fails:

~# semodule -B
libsemanage.semanage_install_active: Unable to create sybolic link from
/etc/selinux/mcs/modules/active/policy.kern to
/etc/selinux/mcs/policy/policy.28 error code 0. (Permission denied).

AVC shows a denial for the semodule command, running as semanage_t,
trying to create a lnk_file in semanage_module_t.
2013-11-13 09:13:32 -05:00
Chris PeBenito
eb4512f6eb Module version bump for dhcpc fixes from Dominick Grift. 2013-09-27 17:15:22 -04:00
Chris PeBenito
f0e0066a7b Reorder dhcpc additions. 2013-09-27 17:15:02 -04:00
Dominick Grift
b1599e01fe sysnetwork: dhcpc binds socket to random high udp ports sysnetwork: do not audit attempts by ifconfig to read, and write dhcpc udp sockets (looks like a leaked fd)
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 17:13:12 -04:00
Chris PeBenito
20471346ed Silence symlink reading by setfiles since it doesn't follow symlinks anyway. 2013-09-27 17:09:43 -04:00
Chris PeBenito
57f00181ee Module version bump for mount updates from Dominick Grift. 2013-09-27 16:54:54 -04:00
Dominick Grift
85016ae811 mount: sets kernel thread priority mount: mount reads /lib/modules/3.10-2-amd64/modules.dep mount: mount lists all mount points
In debian mount was trying to list / on a tmpfs (/run/lock). Since
var_lock_t is a mountpoint type, and so is mnt_t, i decided to implement
a files_list_all_mountpoints() and call that for mount because it makes
sense

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 16:50:38 -04:00
Chris PeBenito
b7b3b55280 Module version bumps for Debian udev updates from Dominick Grift. 2013-09-27 16:44:54 -04:00
Chris PeBenito
756a5e5101 Update contrib 2013-09-27 16:44:28 -04:00
Dominick Grift
0947e315ea udev: runs: /usr/lib/avahi/avahi-daemon-check-dns.sh which creates /run/avahi-daemon directory
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 16:40:09 -04:00
Chris PeBenito
24f4016ec5 Move stray Debian rule in udev. 2013-09-27 16:36:52 -04:00
Dominick Grift
5905067f2a udev-acl.ck lists /run/udev/tags/udev-acl udev blocks suspend, and compromises kernel
udevadm wants to create files in /run/udev/data. It writes to udev_tbl_t
directories

udev_t runs udisks-lvm-pv-export with a domain transition to lvm_t

udev: remove compromise_kernel capability2 av perm as its currently not
supported in reference policy

udev: udevadm managing udev_tbl_t symbolic links (/run/udev/watch/6)

udev: udevd manages control udev_tbl_t type socket

udev: udevd manages udev_tbl_t directories
named files pid filetrans for /run/udev directory

udev: lets just label /run/udev type udev_var_run_t and get it over with

udev: make the files_pid_filetrans more specific because it appears that
udev also creates directories in /run that we dont want to have created
with type udev_var_run_t (/run/avahi-daemon in Debian)

udev: udev-acl.ck uses dbus system bus fds

udev: sends dbus message to consolekit manager:
OpenSessionWithParameters

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 16:35:28 -04:00
Chris PeBenito
be570944e5 Module version bump for ssh server caps for Debian from Dominick Grift. 2013-09-27 16:25:56 -04:00
Dominick Grift
fc8bbe630a ssh: Debian sshd is configured to use capabilities
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 16:25:15 -04:00
Chris PeBenito
cf905e8ef1 Module version bumps for dhcpc leaked fds to hostname. 2013-09-27 15:55:52 -04:00
Dominick Grift
0857061b58 hostname: do not audit attempts by hostname to read and write dhcpc udp sockets (looks like a leaked fd)
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 15:13:19 -04:00
Chris PeBenito
48554d9376 Module version bump for gdomap port from Dominick Grift. 2013-09-27 15:12:51 -04:00
Dominick Grift
9e62ecd264 corenetwork: Declare gdomap port, tcp/udp:538
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 15:08:58 -04:00
Chris PeBenito
15f32f59fe Module version bump for xserver console and fc fixes from Dominick Grift. 2013-09-27 15:08:12 -04:00
Dominick Grift
57f62fe531 xserver: associate xconsole_device_t (/dev/xconsole) to device_t (devtmpfs)
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 14:44:46 -04:00
Dominick Grift
cb306b0c95 xserver: catch /run/gdm3
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 14:44:13 -04:00
Chris PeBenito
f0ad29f609 Module version bump for debian ifstate changes from Dominick Grift. 2013-09-27 14:42:47 -04:00
Chris PeBenito
b4b077f3fd Rearrange sysnet if blocks. 2013-09-27 14:41:54 -04:00
Dominick Grift
ac5d072465 sysnetwork: Debian stores network interface configuration in /run/network (ifstate), That directory is created by the /etc/init.d/networking script.
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-27 14:39:29 -04:00
Chris PeBenito
360438c194 Module version bump for xdm dbus access from Dominick Grift. 2013-09-26 11:09:28 -04:00
Dominick Grift
2aad2492e9 xdm: is a system bus client and acquires service on the system bus xdm: dbus chat with accounts-daemon
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 10:51:02 -04:00
Chris PeBenito
77f13c4993 Module version bump for slim fc entries from Sven Vermeulen. 2013-09-26 10:48:55 -04:00
Sven Vermeulen
34038013c7 Extend slim /var/run expression
On Gentoo, slim files are not in /var/run/slim, but directly in
/var/run. All names start with slim though, so changing the expression
to match those as well.

There is already a file transition in place (xdm_t writing files in
var_run_t -> xdm_var_run_t) so that needs no further changes.

Reported-by: Luis Ressel <aranea@aixah.de>
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-09-26 10:47:50 -04:00
Chris PeBenito
fa50eb742f Module version bump for ping capabilities from Sven Vermeulen. 2013-09-26 10:47:32 -04:00
Sven Vermeulen
56c43144d7 Allow ping to get/set capabilities
When ping is installed with capabilities instead of being marked setuid,
then the ping_t domain needs to be allowed to getcap/setcap.

Reported-by: Luis Ressel <aranea@aixah.de>
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-09-26 10:46:33 -04:00
Chris PeBenito
7aed0fd9dd Module version bump for init interface and corecommand fc from Dominick Grift. 2013-09-26 10:45:51 -04:00
Dominick Grift
ceb6e7fcfb corecmd: avahi-daemon executes /usr/lib/avahi/avahi-daemon-check-dns.sh
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 10:32:23 -04:00
Dominick Grift
da5f2acb27 init: create init_use_inherited_script_ptys() for tmpreaper (Debian)
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 10:30:59 -04:00
Chris PeBenito
3d08aca2f4 Module version bump for virtio console from Dominick Grift. 2013-09-26 10:28:55 -04:00
Chris PeBenito
1070ba4ff9 Whitespace fix in terminal.te. 2013-09-26 10:28:24 -04:00
Dominick Grift
a43a205931 Initial virtio console device
Also known as 'vmchannel', a transport mechanism is needed for
communication between the host userspace and guest userspace for
achieving things like making clipboard copy/paste work seamlessly across
the host and guest, locking the guest screen in case the vnc session to
the guest is closed and so on. This can be used in offline cases as
well, for example with libguestfs to probe which file systems the guest
uses, the apps installed, etc.

Virtio-serial is just the transport protocol that will enable such
applications to be written. It has two parts: (a) device emulation in
qemu that presents a virtio-pci device to the guest and (b) a guest
driver that presents a char device interface to userspace applications.

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 10:27:29 -04:00
Chris PeBenito
dd1b596ae7 Module version bump for unconfined dbus fixes from Dominick Grift. 2013-09-26 10:25:47 -04:00
Dominick Grift
1a88de7131 Unconfined domains have unconfined access to all of dbus rather than only system bus
unconfined: unconfined_t is real-time scheduled by rtkit

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 10:14:30 -04:00
Chris PeBenito
ed1e6abc11 Update contrib. 2013-09-26 10:04:12 -04:00
Chris PeBenito
7f736f3587 Module version bump for selinuxfs location change from Dominick Grift. 2013-09-26 09:52:37 -04:00
Dominick Grift
e6e9e2d08b selinux: selinuxfs is now mounted under /sys/fs/selinux instead of /selinux, so we need to allow domains that use selinuxfs to interface with SELinux to traverse /sys/fs to be able to get to /sys/fs/selinux
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 09:51:01 -04:00
Chris PeBenito
0a60e5753f Module version bump for udev Debian fixes from Dominick Grift. 2013-09-26 09:41:25 -04:00
Chris PeBenito
8e01aff2a5 Add comment for debian avahi-daemon-check-dns.sh usage by udev 2013-09-26 09:41:09 -04:00
Dominick Grift
5db6014548 udev: This is specific to debian i think. Some how the /usr/lib/avahi/avahi-daemon-check-dns\.sh ends up in the udev_t domain
The script basically does what the name suggests, and additionally it
need to be able to stop and start avahi-daemon via its init script

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 09:39:33 -04:00
Chris PeBenito
50e5772ead Module version bump for restricted x user template fix from Dominick Grift. 2013-09-26 09:29:42 -04:00
Dominick Grift
3b0eefcc9e userdomain: restricted xwindows user (squash me)
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 09:28:55 -04:00
Chris PeBenito
a2aeeefd98 Module version bump for fc fix in authlogin from Dominick Grift. 2013-09-26 09:27:04 -04:00
Dominick Grift
4f063c94d9 authlogin: Sudo file context specification did not catch paths (squash me)
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 09:25:27 -04:00
Chris PeBenito
5a727e1c60 Module version bump for lvm update from Dominick Grift. 2013-09-26 09:24:58 -04:00
Dominick Grift
43d6ac3f8e lvm: lvm and udisks-lvm-pv-e read /run/udev/queue.bin
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 09:16:36 -04:00
Chris PeBenito
48a55abb0f Module version bump for sysadm fix for git role usage from Dominick Grift. 2013-09-26 09:16:03 -04:00
Dominick Grift
ab3b84ecec sysadm: Doesnt work with direct_initrc = y
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 09:14:12 -04:00
Chris PeBenito
55ac5a503d Module version bump for ethtool reading pm-powersave.lock from Dominick Grift. 2013-09-26 09:14:07 -04:00
Dominick Grift
7c6ba1570e sysnetwork: ethtool reads /run/pm-utils/locks/pm-powersave.lock
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 08:57:19 -04:00
Chris PeBenito
5544324eb6 Module version bump for syslog reading overcommit_memory from Dominick Grift. 2013-09-26 08:54:47 -04:00
Dominick Grift
d66cfb529b logging: syslog (rs:main Q:Reg) reading sysctl_vm files (overcommit_memory) in Debian
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 08:49:38 -04:00
Chris PeBenito
0b1efe5612 Module version bump for tmpfs associate to device_t from Dominick Grift. 2013-09-26 08:48:48 -04:00
Dominick Grift
e3072cb7bf filesystem: associate tmpfs_t (shm) to device_t (devtmpfs) file systems
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 08:46:36 -04:00
Chris PeBenito
7174140178 Module version bump for xserver and selinuxutil updates from Dominick Grift. 2013-09-26 08:32:33 -04:00
Chris PeBenito
b2eaf87020 Add comment for setfiles using /dev/console when it needs to be relabeled. 2013-09-26 08:31:41 -04:00
Dominick Grift
dae823c43a Restorecon reads, and writes /dev/console before it is properly labeled
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 08:30:00 -04:00
Dominick Grift
1a5c0ec970 These regular expressions were not matched
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 08:23:37 -04:00
Chris PeBenito
2f6ea284d2 Update contrib. 2013-09-23 15:47:09 -04:00
Chris PeBenito
65499f0580 Module version bump for redis port from Dominick Grift. 2013-09-23 15:47:00 -04:00
Dominick Grift
b44a96030e Support redis port tcp,6379
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-23 14:44:16 -04:00
Chris PeBenito
951462610d Module version bump for pstore filesystem support from Dominick Grift. 2013-09-23 14:41:03 -04:00
Dominick Grift
bf1ab85c1f Initial pstore support
Generic interface to platform dependent persistent storage
https://www.kernel.org/doc/Documentation/ABI/testing/pstore

This basically works pretty much the same as cgroup file systems from a
SELinux perspective

Make sure that the installed /sys/fs/pstore directory is labeled
properly so that the pstore file system can be mounted on that

I also removed the files_type() calls as they are duplicate (it is
already called in files_mountpoint)

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-23 14:31:20 -04:00
Chris PeBenito
36e088fa43 Module version bump for kerberos keytab changes for ssh from Dominick Grift. 2013-09-23 14:28:00 -04:00
Dominick Grift
22f71be4e3 The kerberos_keytab_template() template is deprecated: Breaks monolithic built (out-of-scope)
This keytab functionality should be re-evaluated because it does not
make sense in its current implementation

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-23 14:15:46 -04:00
Sven Vermeulen
94a6b29e00 Support named file transition for fixed_disk_device_t
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-08-26 08:51:20 -04:00
Sven Vermeulen
6fb9a34679 Get grub2-install to work properly
The grub2-install application runs a few grub2-* commands. Two of those,
grub2-bios-setup and grub2-probe, need read/write access to the (fixed) disks.

Mark those two applications as bootloader_exec_t (as is the case with the "grub"
legacy command in the past) allows the commands to continue.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-08-26 08:32:53 -04:00
Chris PeBenito
1ff40b5ec7 Add label for parted. 2013-08-26 08:30:49 -04:00
Chris PeBenito
7e95a88171 Update contrib. 2013-05-14 11:21:37 -04:00
Chris PeBenito
2b7b44d80e Remove general unlabeled packet usage.
Back when the SECMARK implementation was new, the packet class was always
checked.  Because of that, unlabeled_t packet rules proliferated refpolicy
since the common case was to have no SECMARK rules.  Since then, the kernel
has been modified to only enforce the packet class if there are SECMARK
rules.  Remove the unlabeled_t packet rules, since users of SECMARK will
likely want no unlabeled_t packet rules, and the common case users will
have no impact since the packet class isn't enforced on their systems.

To have partial SECMARK confinement, the following rule applies:

allow { domain -type_i_want_to_constrain_t } unlabeled_t:packet { send recv };

It seems like over-allowing, but if you have no SECMARK rules, it's the equivalent of:

allow * unlabeled_t:packet { send recv };

Signed-off-by: Chris PeBenito <cpebenito@tresys.com>
2013-05-14 10:15:34 -04:00
Chris PeBenito
7f171849e5 Update contrib to pull in minidlna. 2013-05-09 09:18:59 -04:00
Sven Vermeulen
af30431070 Add trivnet1 port (8200)
Create the proper port types for trivnet1 (port 8200)

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-05-09 08:54:20 -04:00
Chris PeBenito
04a929f7c0 Update Changelog and VERSION for release. 2013-04-24 16:14:52 -04:00
Chris PeBenito
d174521a64 Bump module versions for release. 2013-04-24 16:14:52 -04:00
Chris PeBenito
924e16ff77 Update contrib 2013-04-23 08:04:09 -04:00
Chris PeBenito
77a244c393 Update contrib. 2013-04-05 09:46:23 -04:00
Chris PeBenito
f1aa23dc47 Add conntrack fc entry.
This tool is for maintaining the netfilter connection tracking.
2013-04-05 09:45:04 -04:00
Chris PeBenito
27044cf65b Add swapoff fc entry. 2013-04-05 09:43:14 -04:00
Chris PeBenito
7c1cbfd97d Module version bump for chfn fixes from Sven Vermeulen. 2013-04-04 15:22:08 -04:00
Sven Vermeulen
62e395b90b chfn_t reads in file context information and executes nscd
The chsh application (which runs in the chfn_t domain) requires read access on
the file context definitions. If not, the following error occurs:

Changing the login shell for root
Enter the new value, or press ENTER for the default
	Login Shell [/bin/zsh]: /bin/bash
chsh: failure while writing changes to /etc/passwd

The following AVC denials are shown:

Jan 23 20:23:43 lain kernel: [20378.806719] type=1400 audit(1358969023.507:585):
avc:  denied  { search } for  pid=18281 comm="chsh" name="selinux" dev="dm-0"
ino=23724520 scontext=staff_u:sysadm_r:chfn_t
tcontext=system_u:object_r:selinux_config_t tclass=dir

In permissive mode, this goes up to:

Jan 23 20:22:15 lain kernel: [20290.691128] type=1400 audit(1358968935.217:566):
avc:  denied  { open } for  pid=18195 comm="chsh"
path="/etc/selinux/strict/contexts/files/file_contexts" dev="dm-0" ino=23726403
scontext=staff_u:sysadm_r:chfn_t tcontext=staff_u:object_r:file_context_t
tclass=file

Hence, adding in seutil_read_file_contexts().

A second error is that chsh, if available, wants to execute nscd:

Changing the login shell for root
Enter the new value, or press ENTER for the default
        Login Shell [/bin/sh]: /bin/bash
chsh: cannot execute /usr/sbin/nscd: Permission denied
chsh: nscd exited with status 126
chsh: Failed to flush the nscd cache.
chsh: cannot execute /usr/sbin/nscd: Permission denied
chsh: nscd exited with status 126
chsh: Failed to flush the nscd cache.
chsh: cannot execute /usr/sbin/nscd: Permission denied
chsh: nscd exited with status 126
chsh: Failed to flush the nscd cache.

Similar to most other user admin utilities, we grant it the rights to run nscd.

Changes since v1
- Removed seutil_dontaudit_search_config() call

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-04-04 14:25:55 -04:00
Chris PeBenito
019a11b370 Update contrib 2013-02-26 09:14:19 -05:00
Chris PeBenito
8e122068e4 Fix bug in userdom_delete_all_user_home_content_files() from Kohei KaiGai. 2013-02-25 11:26:13 -05:00
Chris PeBenito
fd569471c3 Module version bump for Debian updates from Laurent Bigonville. 2013-01-23 07:23:52 -05:00
Laurent Bigonville
6a62fd0acb Label nut drivers that are installed in /lib/nut on Debian as bin_t 2013-01-23 07:12:48 -05:00
Laurent Bigonville
20e47b2f4e Label executables under /usr/lib/gnome-settings-daemon/ as bin_t
On Debian, part of gnome-settings-daemon is installed in that
directory
2013-01-23 07:12:34 -05:00
Laurent Bigonville
8be0fad549 Add initrc_t to use block_suspend capability
This is needed by nm-dispatcher.action witch is labeled as
NetworkManager_initc_exec_t and is transitioned to initrc_t
2013-01-23 07:12:18 -05:00
Laurent Bigonville
693532ae68 Add mount_var_run_t type and allow mount_t domain to manage the files and directories
In Debian, mount store some information (a utab file) under
/var/run/mount directory.

This is inspired by the fedora policy.
2013-01-23 07:11:17 -05:00
Laurent Bigonville
ef854630b4 Label var_lock_t as a mountpoint
In Debian, /var/lock is a symlink to /var/run/lock which is a tmpfs
mount.
2013-01-23 07:10:13 -05:00
Laurent Bigonville
7955d0b246 Add support for rsyslog
Allow sys_nice capability, setsched, allow to search in /var/spool and
syslog_t domain to read network state files in /proc

squash! Add support for rsyslog
2013-01-23 07:10:00 -05:00
Laurent Bigonville
bb00509804 Label executables in /usr/lib/NetworkManager/ as bin_t 2013-01-23 07:09:24 -05:00
Laurent Bigonville
bc40d90816 udev.if: Call files_search_pid instead of files_search_var_lib in udev_manage_pid_files
udev_manage_pid_files is supposed to manage files that are located in
/var/run, allow to search files in this directory instead of /var/lib
2013-01-23 07:09:05 -05:00
Laurent Bigonville
0ca8ac16f3 Label /var/run/initctl as initctl_t
In Debian, the initctl pipe has been moved from /dev/initctl to
/run/initctl
2013-01-23 07:08:38 -05:00
Laurent Bigonville
4ae3d78602 Label /var/run/motd.dynamic as initrc_var_run_t 2013-01-23 07:08:06 -05:00
Laurent Bigonville
b40dc4f657 Label /var/run/shm as tmpfs_t for Debian
In Debian, /dev/shm is a symlink to /var/run/shm. Label that mountpoint
the same way.
2013-01-23 07:07:28 -05:00
Chris PeBenito
be2e70be8d Module version bump for fixes from Dominick Grift. 2013-01-03 10:53:34 -05:00
Dominick Grift
79e1e4efb9 NSCD related changes in various policy modules
Use nscd_use instead of nscd_socket_use. This conditionally allows
nscd_shm_use

Remove the nscd_socket_use from ssh_keygen since it was redundant
already allowed by auth_use_nsswitch

Had to make some ssh_keysign_t rules unconditional else
nscd_use(ssh_keysign_t) would not build (nested booleans) but that does
not matter, the only actual domain transition to ssh_keysign_t is
conditional so the other unconditional ssh_keygen_t rules are
conditional in practice

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-01-03 10:43:10 -05:00
Dominick Grift
8b3ffb9663 Changes to the userdomain policy module
Make sure various virt user home content gets created with a type
transition and proper file contexts for common users

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-01-03 10:43:10 -05:00
Dominick Grift
88b2de1c17 Changes to the init policy module
virt_manage_svirt_cache() is deprecated, use virt_manage_virt_cache()
instead

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-01-03 10:43:10 -05:00
Chris PeBenito
569afb9039 Update contrib. 2013-01-03 10:33:27 -05:00
Chris PeBenito
e1ab3f885b Module version bump for misc updates from Sven Vermeulen. 2013-01-03 10:32:41 -05:00
Sven Vermeulen
517f37fd26 Introduce exec-check interfaces for passwd binaries and useradd binaries
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-01-03 10:32:41 -05:00
Sven Vermeulen
be31d3a183 Allow initrc_t to read stunnel configuration
The stunnel init script reads the stunnel configuration to find out where to
store and check for the PID file

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-01-03 10:32:41 -05:00
Sven Vermeulen
c105a1ccad Allow syslogger to manage cron log files (v2)
Some cron daemons, including vixie-cron, support using the system logger for
handling their logging events. Hence we allow syslogd_t to manage the cron logs,
and put a file transition in place for the system logger when it creates the
cron.log file.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-01-03 10:32:41 -05:00
Sven Vermeulen
829b252cdc lvscan creates the /run/lock/lvm directory if nonexisting (v2)
If the /run/lock/lvm directory doesn't exist yet, running any of the LVM tools
(like lvscan) will create this directory. Introduce a named file transition for
the lock location when a directory named "lvm" is created and grant the
necessary rights to create the directory.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-01-03 10:32:41 -05:00
Sven Vermeulen
84497cc8e8 Postgresql 9.2 connects to its unix stream socket
When starting postgresql, it fails with the (little saying) error message:
pg_ctl: could not start server

In the denials, we notice:
Nov 24 10:41:52 lerya kernel: [1628900.540506] type=1400
audit(1353750112.021:10143): avc:  denied  { connectto } for  pid=20481
comm="pg_ctl" path="/run/postgresql/.s.PGSQL.5432" ipaddr=...
scontext=system_u:system_r:postgresql_t tcontext=system_u:system_r:postgresql_t
tclass=unix_stream_socket

Hence, allow postgresql to connect to its own stream socket.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2013-01-03 10:32:41 -05:00
Chris PeBenito
e0f7ab0a8a Module version bump for zfs labeling from Matthew Thode. 2012-12-07 13:23:41 -05:00
Matthew Thode
94c2ae8771 Implement zfs support
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Just adding zfs to the list of defined filesystems in filesystem.te

Signed-off-by: Matthew Thode <mthode@mthode.org>
2012-12-07 13:07:15 -05:00