Commit Graph

651 Commits

Author SHA1 Message Date
Chris PeBenito e036d3d694 Module version bump for ipsec net sysctls reading from Miroslav Grepl. 2012-10-02 10:15:31 -04:00
Miroslav Grepl 672f146fec Allow ipsec to read kernel sysctl 2012-10-02 10:14:44 -04:00
Chris PeBenito 99d1e6b9f1 Module verision bump for Debian cert file fc update from Laurent Bigonville. 2012-10-02 10:12:08 -04:00
Laurent Bigonville e5c59868be Add Debian location for PKI files 2012-10-02 10:10:59 -04:00
Chris PeBenito 9294b7d11f Module version bump for cfengine fc change from Dominick Grift. 2012-10-02 10:10:18 -04:00
Dominick Grift 111b0b3176 Remove var_log_t file context spec
The /var/cfengine/output location will be labeled in the forthcoming
cfengine policy module that will be ported from Fedora

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2012-10-02 10:09:33 -04:00
Chris PeBenito 75c6d0b8c3 Module version bump for kmod fc from Laurent Bigonville. 2012-10-02 10:08:41 -04:00
Chris PeBenito 071537fab5 split kmod fc into two lines. 2012-10-02 10:08:09 -04:00
Laurent Bigonville e57cb31d34 Add insmod_exec_t label for kmod executable
lsmod, rmmod, insmod, modinfo, modprobe and depmod are now symlinks to
the kmod executable
2012-10-02 09:59:28 -04:00
Chris PeBenito 140cd7bb6d Module version bump for various changes from Sven Vermeulen. 2012-09-17 10:00:10 -04:00
Sven Vermeulen bd4af49996 Allow init scripts to read courier configuration
The courier-imap and courier-pop3 daemons are started by sourcing their
configuration files, and then invoking the daemons using the proper options. If
this is done through a specialized script, then init only needs to call this
script (where a proper transition occurs) but if the init script itself does
this, it needs to be able to read the configuration files.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-09-17 09:31:44 -04:00
Sven Vermeulen a3ac9f6054 Gentoo's openrc does not require initrc_exec_t for runscripts anymore
The Gentoo-specific runscripts in /sbin should not be marked as initrc_exec_t
anymore (just bin_t).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-09-17 09:31:40 -04:00
Sven Vermeulen 074cfbeb5b Allow syslogd to create /var/lib/syslog and /var/lib/misc/syslog-ng.persist
If the /var/lib/syslog directory does not exist, then syslog-ng (running in
syslogd_t) will attempt to create the directory.

Allow the syslogd_t domain to create the directory, and use an automatic file
transition towards syslogd_var_lib_t.

Also, the syslog-ng daemon uses a persistence file in
/var/lib/misc/syslog-ng.persist (and .persist- if it suspects a collision). As
/var/lib/misc is still a generic var_lib_t, we have the syslogd_t daemon write
its files as syslogd_var_lib_t therein.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-09-17 09:31:35 -04:00
Sven Vermeulen 9176e86474 Puppet uses mount output for verification
Puppet calls mount to obtain the list of mounted file systems, redirecting its
output to a temporary file (labeled puppet_tmp_t). This allows the mount domain
to write to this resource.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-09-17 09:31:32 -04:00
Chris PeBenito d38855ea95 Module version bump for init_daemon_run_dirs usage from Sven Vermeulen. 2012-08-29 08:50:56 -04:00
Sven Vermeulen 7857ccdf21 Use the init_daemon_run_dir interface for udev
Use the init_daemon_run_dir interface in order to allow initrc_t to create the
run dirs of the udev daemon with the proper file transition.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-08-29 08:45:21 -04:00
Sven Vermeulen dc663fe40a Introduce init_daemon_run_dir transformation
Due to the introduction of /run, many init scripts need to create the daemon run
dirs (such as /run/udev for the udev init script). To simplify this, we
introduce the "daemonrundir" attribute to which initrc_t has the necessary
create_dirs_perms granted. Because it often needs to change the attributes or
ownership of the directories as well, we also grant the setattr rights on the
directory.

Then, when needed, the modules can call this interface while adding the name of
the directory. This will trigger a named file transition when initrc_t creates
this directory:
  init_daemon_run_dir(udev_var_run_t, "udev")
will trigger
  files_pid_filetrans(initrc_t, udev_var_run_t, dir, "udev")

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-08-29 08:45:17 -04:00
Chris PeBenito 0a6013cd4f Module version bump for /run/dhcpc directory creation by dhcp from Sven Vermeulen. 2012-08-21 15:25:13 -04:00
Sven Vermeulen 452942ca99 DHCP client's hooks create /run/dhcpc directory
This directory contains the working files for updating network-related files
(like resolv.conf for name servers) before they are copied to the fixed
location. Although already in use previously, this location (/var/run/dhcpc or
/var/run/dhcpcd) was statically defined on the system.

With the introduction of /run and systems having /var/run -> /run, this is now a
dynamically created directory by dhcpc_t. Hence, the policy is enhanced allowing
dhcpc_t to create dhcpc_var_run_t directories, and include a file transition for
directories created in the var_run_t location(s).

Changes since v1
----------------
- Use create_dirs_pattern instead of manage_dirs_pattern

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-08-21 15:07:47 -04:00
Chris PeBenito 2b70efd2f6 Module version bump for fc substitutions optimizations from Sven Vermeulen. 2012-08-15 11:00:55 -04:00
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 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 3516535aa6 Bump module versions for release. 2012-07-25 14:33:06 -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 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 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
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 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
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 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
Chris PeBenito 100734ef64 Module version bump for asterisk updates; pull in asterisk contrib changes. 2012-04-20 16:36:38 -04:00
Sven Vermeulen 00247b9d3f Allow initrc to manage asterisk log and pid file attributes
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-04-20 16:25:45 -04:00
Chris PeBenito 9e56720a39 Module version bump and changelog for various dontaudits from Sven Vermenulen. 2012-04-20 16:06:54 -04:00
Sven Vermeulen fbac862b89 Adding dontaudits for mount
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-04-20 15:44:05 -04:00
Sven Vermeulen 1bd83205aa Do not audit rw on dhcp client unix_stream_sockets
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-04-20 15:43:34 -04:00
Chris PeBenito 364768e8e9 Fix whitespace issues in sysnetwork.if. 2012-04-20 15:39:36 -04:00
Sven Vermeulen 2260ef56f8 Adding dontaudit interfaces in sysnet
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-04-20 15:39:04 -04:00
Chris PeBenito ee8210c690 Module version bump for make role attributes able to type their "own" types patch from Harry Ciao. 2012-02-27 10:25:08 -05:00
Chris PeBenito e707a70819 Rearrange role lines from "own" patch. 2012-02-27 10:18:00 -05:00
Harry Ciao 93c3ee8b7f Make role attributes able to type their "own" types.
By default, any role attribute should be able to type their "own" types
that share the same prefix and used in the run interface. For example,

role newrole_roles types newrole_t;

so that the calling domain of the seutil_run_newrole() interface could
properly tansition into newrole_t. Without above role rule, the caller's
role won't be associated with newrole_t.

Other role attributes such as useradd_roles, groupadd_roles, chfn_roles
and run_init_roles should be fixed in the same way.
2012-02-27 10:12:57 -05:00
Chris PeBenito f65edd8280 Bump module versions for release. 2012-02-15 14:32:45 -05:00
Chris PeBenito 3cbb3701cd Module version bumps for debian fc patch from Russell Coker. 2011-11-16 15:31:48 -05:00
Chris PeBenito e78ada8605 Debian file locations patch from Russell Coker. 2011-11-16 15:29:18 -05:00
Chris PeBenito ba817fccd9 Add userdom interfaces for user application domains, user tmp files, and user tmpfs files. 2011-10-28 08:49:19 -04:00
Chris PeBenito e2fa4f2e8c Add user application, tmp and tmpfs file interfaces. 2011-10-28 08:48:10 -04:00
Chris PeBenito 7b98e4f436 Clean up stale TODOs. 2011-09-26 11:51:47 -04:00
Chris PeBenito 7d6b1e5889 Module version bump and changelog for role attributes usage. 2011-09-21 09:16:34 -04:00
Chris PeBenito f9145eae44 Add role attributes to dhcpc. 2011-09-21 08:27:37 -04:00
Chris PeBenito 08cf443ff6 Add role attributes in newrole and run_init. 2011-09-21 08:27:34 -04:00
Chris PeBenito e6453fa567 Add role attributes to mount. 2011-09-21 08:27:32 -04:00
Chris PeBenito d3cca4f927 Add role attributes to update_modules in modutils. 2011-09-21 08:27:28 -04:00
Chris PeBenito a858f08e5b Add role attributes in iptables. 2011-09-21 08:27:24 -04:00
Chris PeBenito e3a043d18d Convert selinuxutil over to role attributes for semanage. 2011-09-21 08:26:58 -04:00
Chris PeBenito 370081cc60 Remove stray "A" from unconfined. 2011-09-14 12:46:56 -04:00
Sven Vermeulen 017b505110 Allow unconfined users to call portage features
The unconfined user is currently not allowed to call portage-related
functions. However, in a targeted system (with unconfined domains
enabled), users (including administrators) should be allowed to
transition to the portage domain.

We position the portage-related calls outside the "ifdef(distro_gentoo)"
as other distributions support Portage as well.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-09-14 12:33:11 -04:00
Chris PeBenito 1c5dacd2c0 Change secure_mode_insmod to control sys_module capability rather than controlling domain transitions to insmod.
Based on a patch from Dan Walsh.
2011-09-13 14:45:14 -04:00
Chris PeBenito f718181930 Module version bump for semanage permissive mode feature support. 2011-09-13 12:43:37 -04:00
Sven Vermeulen f12ebf31e2 Support semanage permissive mode
The semanage application supports a "semanage permissive" feature,
allowing certain domains to be marked for running permissive (rather
than the entire system).

To support this feature, we introduce a semanage_var_lib_t type for the
location where semanage will keep its permissive_<domain>.* files, and
allow semanage_t to work with fifo_files (needed for the command to
work).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-09-13 12:36:48 -04:00
Chris PeBenito 09248fa0db Move modules to contrib submodule. 2011-09-09 10:10:03 -04:00
Chris PeBenito f07bc3f973 Module version and changelog for openrc and portage updates from Sven Vermeulen. 2011-09-06 14:02:12 -04:00
Chris PeBenito 6cd8334d12 Whitespace fixes in portage and init. 2011-09-06 14:00:58 -04:00
Chris PeBenito ca4d39d31c Rename init_rc_exec() to init_exec_rc(). 2011-09-06 13:58:04 -04:00
Sven Vermeulen c5cbefb892 Gentoo integrated run_init support re-executes rc
When an init script is launched, Gentoo's integrated run_init support
will re-execute /sbin/rc (an all-in-one binary) for various functions.
The run_init_t domain here should not be allowed to transition yet, so
we allow it to execute /sbin/rc without transitioning.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-09-06 13:22:37 -04:00
Sven Vermeulen bce639cff4 Introduce rc_exec_t as file entry for initrc_t
Within Gentoo, the init system (openrc) uses a single binary (/sbin/rc)
for all its functions, be it executing init scripts, managing runlevels,
checking state, etc. This binary is not allowed to be labeled
initrc_exec_t as that would trigger domain transitions where this isn't
necessary (or even allowed).

A suggested solution is to use a separate type declaration for /sbin/rc
(rc_exec_t) which transitions where necessary.

This patch includes support for the /sbin/rc rc_exec_t type and declares
the init_rc_exec() interface which allows domains to execute the binary
without transitioning.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-09-06 13:22:22 -04:00
Chris PeBenito 74aaedde68 Whitespace fixes in rsync, samba, and mount. 2011-09-02 09:55:50 -04:00
Chris PeBenito 4a586153a1 Module version bump for load_policy dontaudit of leaked portage fds from Sven Vermeulen. 2011-08-25 07:46:26 -04:00
Chris PeBenito 8dc4e0f223 Whitespace fixes in selinuxutil. 2011-08-25 07:43:36 -04:00
Sven Vermeulen 5d77246f5f Do not audit the use of portage' filedescriptors from load_policy_t
During build and eventual activation of the base policy, the load_policy_t
domain attempts to use a portage file descriptor. However, this serves no
purpose (the loading is done correctly and everything is logged
appropriately).

Hence, we dontaudit this use.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-08-25 07:42:34 -04:00
Chris PeBenito 66e03ec8b2 Module version bump for LDAPS patch. Move a line. 2011-08-24 09:38:58 -04:00
Sven Vermeulen 9a680874fe Support LDAPS for nsswitch-related network activity
Systems that use LDAPS (LDAP over SSL/TLS) for their sysnet_* activities
currently fail since these domains do not allow proper access to the random
devices (needed for SSL/TLS). This patch adds this privilege to
sysnet_use_ldap.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-08-24 09:33:43 -04:00
Chris PeBenito 12904f9fe8 Module version bump for dhcp client patch from Sven Vermeulen. 2011-08-24 09:15:33 -04:00
Sven Vermeulen 4976982e85 Allow dhcp client to update kernel routing table plus context updates
This small patch updates the dhcpc_t (DHCP client domain) to allow updating the
kernel's routing tables (as that is a primary purpose of a DHCP client) as well
as interact with the kernel through the net_sysctls.

Also, one client (dhcpcd) uses /var/run/dhcpcd so add that in the file context
definition as well.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-08-24 09:13:33 -04:00
Chris PeBenito 003361c264 Module version bump for xtables-multi patch from Sven Vermeulen. 2011-08-24 08:55:00 -04:00
Sven Vermeulen 2ebb974006 ip6?tables-multi is combined in xtables-multi
Since april, the *-multi applications offered through iptables are combined
through a single binary called xtables-multi. The previous commands are now
symbolic links towards this application.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-08-24 08:35:57 -04:00
Chris PeBenito 78e65fb36c Module version bump for setfiles audit message patch from Roy Li. 2011-08-23 08:21:40 -04:00
Chris PeBenito 5d834aa7dd Whitespace fix in selinuxutil. 2011-08-23 08:21:40 -04:00
Roy.Li 0bd595020c Make setfiles be able to send audit messages.
When audit subsystem is enabled, and setfiles works from root
dir, setfiles would send the AUDIT_FS_RELABEL information to
audit system, If no permission to send the information to audit
by netlink, setfiles would return error.

The test cases to reproduce this defect:
	=> restorecon -R /
	=> echo $?
	255
	=>

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
2011-08-23 08:21:40 -04:00
Chris PeBenito aa4dad379b Module version bump for release. 2011-07-26 08:11:01 -04:00
Chris PeBenito 3cbc972771 Fix role declaration to handle new roleattribute requirements. 2011-07-25 12:10:05 -04:00
Chris PeBenito a29c7b86e1 Module version bump and Changelog for auth file patches from Matthew Ife. 2011-07-18 13:48:05 -04:00
Chris PeBenito a4912ae653 Whitespace fix in authlogin.if. 2011-07-18 13:46:18 -04:00
Matthew Ife 4ff4e1c505 Replace deprecated *_except_shadow macro calls with *_except_auth_files calls. 2011-07-18 13:40:38 -04:00
Matthew Ife 61fb2009ad Create a new attribute for auth_file types. Add shadow as an auth_file type. Add new interfaces to manage auth_file types Deprecate *_except_shadow macros in favour of *_except_auth_files 2011-07-18 13:40:37 -04:00
Chris PeBenito e5745955f9 Udev fc for /var/run/udev from Martin Orr.
This is intended to label /run/udev, but I am assuming that everyone
will use file_contexts.subs(_dist)? to substitute /var/run for /run,
since there are currently no other fcs for /run in refpolicy.

The label is udev_tbl_t instead of udev_var_run_t, because /run/udev
contains the data which used to be in /dev/.udev.
2011-07-18 13:36:27 -04:00
Chris PeBenito b598c4421c Merge various apps layer changes from the Fedora policy. 2011-06-08 13:05:34 -04:00
Chris PeBenito d5048bc791 Module version bump for raid run interface. 2011-05-04 09:09:08 -04:00
Chris PeBenito c3a60ead61 Move raid_run_mdadm() interface. 2011-05-04 09:07:54 -04:00
Chris PeBenito ffc0b4f058 Whitespace fixes in raid.if. 2011-05-02 12:55:45 -04:00
Sven Vermeulen 681831da06 system admin needs to use mdadm, but type is not allowed
After a quick discussion with dominique, new attempt due to two issues:

1. No need (or even forbidden) to have "role $1 types foo_exec_t"
2. Suggestion to use the raid_run_mdadm name instead of raid_mdadm_role. The
   idea here is to use raid_mdadm_role for prefixed domains (cfr. screen)
   whereas raid_run_mdadm is to transition and run into a specific domain

Without wanting to (re?)start any discussion on prefixed versus non-prefixed
domains, such a naming convention could help us to keep the reference policy
cleaner (and naming conventions easy).

Also, refpolicy InterfaceNaming document only talks about run, not role.

So, without much further ado... ;-)

  The system administrator (sysadm_r role) needs to use mdadm, but is not
  allowed to use the mdadm_t type.

  Rather than extend raid_domtrans_mdadm to allow this as well, use a
  raid_mdadm_role (a bit more conform other role usages).

  The other users of raid_domtrans_mdadm are all domains that run in system_r
  role, which does have this type allowed (as per the system/raid.te
  definition), so it wouldn't hurt to use raid_domtrans_mdadm for this.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-05-02 12:54:03 -04:00
Chris PeBenito 3979c6886f Fix init_system_domain() description, pointed out by Elia Pinto. 2011-04-27 10:42:47 -04:00
Chris PeBenito 127d617b31 Pull in some changes from Fedora policy system layer. 2011-04-14 11:36:56 -04:00
Chris PeBenito 1bc5de22c0 Start pulling in pieces of Fedora policy in system layer. 2011-03-31 13:29:59 -04:00
Chris PeBenito ec5d81e1ca Aisexec patch from Miroslav Grepl.
* openais needs ipc_owner and read/write user SysV sempaphores/shared memory
2011-03-21 11:23:26 -04:00
Chris PeBenito 6c4f41ced1 Whitespace fixes in userdomain. 2011-03-21 11:14:34 -04:00
Chris PeBenito 86460648a6 Sysnetwork patch from Miroslav Grepl.
* adds support for "ip xfrm" command which allows assign a context
2011-03-21 09:48:05 -04:00
Chris PeBenito 1ca577db8c Shorewall patch from Miroslav Grepl. 2011-03-21 09:42:12 -04:00
Chris PeBenito 79c8dfe162 Module version bump for audisp patch from Guido Trentalancia. 2011-03-16 08:37:04 -04:00
Guido Trentalancia ff07d7d209 patch to allow the audit dispatcher to read the system state
This patch allows the audit dispatcher to read the system
state.
2011-03-16 08:35:53 -04:00
Chris PeBenito 8103e7c1f4 Module version bump for sysnetwork interface from Guido Trentalancia. 2011-02-28 09:35:02 -05:00
Chris PeBenito a1f7561ad3 Whitespace fixes in sysnetwork. 2011-02-28 09:33:29 -05:00
Guido Trentalancia f39eeece2f patch to add a missing interface in the sysnetwork module
This patch adds a new interface to the sysnetwork module so
that the DHCP client state directories can be searched.
2011-02-28 09:31:39 -05:00
Chris PeBenito 18e37223df Module version bump for init upstart fc patch from Guido Trentalancia. 2011-02-28 09:30:47 -05:00
Guido Trentalancia ad43927c43 patch to add a file context for /sbin/upstart
This patch adds a file context for /sbin/upstart.
2011-02-28 09:24:42 -05:00
Chris PeBenito 219e9a4f9a Module version bump for authlogin patch from Guido Trentalancia. 2011-02-28 09:22:55 -05:00
Chris PeBenito 9262d3c958 Whitespace fixes in authlogin. 2011-02-28 09:22:26 -05:00
Guido Trentalancia baa87c9324 patch to add needed permissions to the authlogin module
This patch adds some needed permissions to the chkpwd_t domain
in policy/modules/system/authlogin.te.
2011-02-28 09:17:05 -05:00
Chris PeBenito 63db3b7e91 Reverse /dev/.udev/(/.*)? dir label fix.
I realized the policy wasn't complete for handling udev_tbl_t dirs, and
updating it wouldn't work because we couldn't make a filetrans on dirs,
since all the dirs in /dev would become udev_tbl_t.  i.e. this would have
been required, but would make problems: dev_filetrans(udev_t, udev_tbl_t, dir);
2011-02-17 09:32:00 -05:00
Chris PeBenito 6c00b1eea3 Module version bump for udev fc fix from Dominick Grift. 2011-02-16 09:57:31 -05:00
Dominick Grift d8b631471a This is not a single file but a directory.
The -- causes /dev/.udev to be labelled device_t instead of udev_tbl_t.

Signed-off-by: Dominick Grift <domg472@gmail.com>
2011-02-16 09:49:50 -05:00
Chris PeBenito 3139988506 Module version bump and changelog for Xen refinement patch from Stephen Smalley. 2011-02-15 13:48:04 -05:00
Chris PeBenito b77313c30e Rearrange lines in Xen. 2011-02-15 13:46:46 -05:00
Chris PeBenito 20e8ce97ed Rearrange blocks in Xen. 2011-02-15 13:15:49 -05:00
Stephen Smalley 14d23ee979 Refine xen policy
Various changes to the Xen userspace policy, including:
- Add gntdev and gntalloc device node labeling.
- Create separate domains for blktap and qemu-dm rather than leaving them in xend_t.
- No need to allow xen userspace to create its own device nodes anymore;
this is handled automatically by the kernel/udev.
- No need to allow xen userspace access to generic raw storage; even if
using dedicated partitions/LVs for disk images, you can just label them
with xen_image_t.

The blktap and qemu-dm domains are stubs and will likely need to be
further expanded, but they should definitely not be left in xend_t.  Not
sure if I should try to use qemu_domain_template() instead for qemu-dm,
but I don't see any current users of that template (qemu_t uses
virt_domain_template instead), and qemu-dm has specific interactions
with Xen.

Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>
2011-02-15 12:59:13 -05:00
Sven Vermeulen a8803084cc Sudo timestamp directory has changed since v1.7.4, reflect this in .fc file
Since sudo 1.7.4, the timestamp directory has moved from /var/run/sudo to
/var/db/sudo, lib or adm (in that order). See also the sudo changeset
http://www.sudo.ws/repos/sudo/rev/8c9440423d98

Keeping the "old" one (/var/run/sudo) for a while for those systems where
sudo has not been updated yet (change is since 1.7.4, Jul 14 2010).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-02-14 10:47:15 -05:00
Chris PeBenito 842bd4ec8a Module version bump and changelog for RAID uevent patch from Sven Vermeulen. 2011-02-14 09:00:48 -05:00
Sven Vermeulen da08bfc043 Allow mdadm to generate uevents (write to /sys/.../uevent) when raids are (dis)assembled
The mdadm application will write into /sys/.../uevent whenever arrays are
assembled or disassembled.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-02-14 08:55:52 -05:00
Chris PeBenito 4adcdf81c9 Changelog and module version bump for Gentoo ALSA init script usage patch from Sven Vermeulen. 2011-02-09 09:28:42 -05:00
Chris PeBenito 65d3ec6a15 Rearrange initrc alsa rule. 2011-02-09 09:27:39 -05:00
Sven Vermeulen c8b1de82cc Allow the alsa init script to read the default asound.state file
In Gentoo, the ALSA init script (alsasound) reads in the default
asound.state file.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-02-09 09:13:59 -05:00
Chris PeBenito a26f6088c9 Changelog and module version bump for LVM semaphore usage patch from Sven Vermeulen. 2011-02-09 09:01:18 -05:00
Sven Vermeulen 57835f4453 LVM uses systemwide semaphores for activities such as vgchange -ay
The LVM subsystem uses system-wide semaphores for various activities.

Although the system boots properly without these (apart from the AVC denials
of course), I would assume that they are here to ensure no corruption of any
kind happens in case of concurrent execution / race conditions.

As such, I rather enable it explicitly in the security policy.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-02-09 09:00:12 -05:00
Chris PeBenito 2998ef21c2 Module load request patch for insmod from Sven Vermeulen. 2011-02-09 08:57:12 -05:00
Sven Vermeulen 9fda512c7b Allow modprobe to request module load
The modprobe utility is sometimes used (for instance for ALSA) to request
the Linux kernel to load a module (through aliases) rather than explicitly
loading the module.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-02-09 08:54:13 -05:00
Justin P. Mattock dd74a2f442 policy/modules/system/lvm.te Typo change directores to directories, and also clean up a comment.
The below patch changes a typo "directores" to "directories", and also
fixes a comment to sound more proper.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
2011-02-01 09:09:26 -05:00
Chris PeBenito 756c96b541 Fix incorrect dependenices in init module interfaces (init_t as an attribute rather than type). 2011-01-31 14:08:11 -05:00
Chris PeBenito 8d46bd3017 Module version bump and changelog for /dev/console login from Harry Ciao. 2011-01-14 14:41:15 -05:00
Chris PeBenito dedbfa4f97 Rename allow_console tunable to console_login. 2011-01-14 11:44:42 -05:00
Harry Ciao fc1ef4ac3b Enable login from /dev/console.
Add the support to login and use the system from /dev/console.

 1. Make gettty_t able to use the /dev/console;
 2. Make local_login_t able to relabel /dev/console to user tty types;
 3. Provide the type_change rule for relabeling /dev/console.

All above supports are controlled by the allow_console tunable.

Signed-off-by: Harry Ciao <qingtao.cao@windriver.com>
2011-01-14 11:23:19 -05:00
Chris PeBenito 4f6f347d4c Module version bump and changelog for hadoop ipsec patch from Paul Nuzzi. 2011-01-13 13:50:47 -05:00
Chris PeBenito 530ad6fc6a Whitespace fixes in corenetwork and ipsec. 2011-01-13 13:37:04 -05:00
Chris PeBenito 371908d1c8 Rename new hadoop ipsec interfaces. 2011-01-13 12:56:12 -05:00
Paul Nuzzi 6237b7241b hadoop: labeled ipsec
On 01/05/2011 08:48 AM, Christopher J. PeBenito wrote:
> On 12/16/10 12:32, Paul Nuzzi wrote:
>> On 12/15/2010 03:54 PM, Christopher J. PeBenito wrote:
>>> On 12/10/10 18:22, Paul Nuzzi wrote:
>>>> Added labeled IPSec support to hadoop.  SELinux will be able to enforce what services are allowed to
>>>> connect to.  Labeled IPSec can enforce the range of services they can receive from.  This enforces
>>>> the architecture of Hadoop without having to modify any of the code.  This adds a level of
>>>> confidentiality, integrity, and authentication provided outside the software stack.
>>>
>>> A few things.
>>>
>>> The verb used in Reference Policy interfaces for peer recv is recvfrom
>>> (a holdover from previous labeled networking implementations).  So the
>>> interfaces are like hadoop_recvfrom_datanode().
>>
>> Easy change.
>>
>>> It seems like setkey should be able to setcontext any type used on ipsec
>>> associations.  I think the best thing would be to add additional support
>>> to either the ipsec or corenetwork modules (I haven't decided which one
>>> yet) for associations.  So, say we have an interface called
>>> ipsec_spd_type() which adds the parameter type to the attribute
>>> ipsec_spd_types.  Then we can have an allow setkey_t
>>> ipsec_spd_types:association setkey; rule and we don't have to update it
>>> every time more labeled network is added.
>>
>> That seems a lot less clunky than updating setkey every time we add a new association.
>>
>>> This is definitely wrong since its not a file:
>>> +files_type(hadoop_lan_t)
>>
>> Let me know how you would like to handle associations and I could update the
>> patch.
>
> Lets go with putting the associations in corenetwork.
>
>>  Will the files_type error be cleared up when we re-engineer this?
>
> I'm not sure what you mean.  The incorrect rule was added in your patch.
>

Adds labeled IPSec policy to hadoop to control the remote processes that are allowed to connect to the cloud's services.

Signed-off-by: Paul Nuzzi <pjnuzzi@tycho.ncsc.mil>
2011-01-13 08:22:32 -05:00