Commit Graph

430 Commits

Author SHA1 Message Date
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
Chris PeBenito 17910a2a8c Module version bump and changelog for mount fixes from Harry Ciao. 2011-01-10 10:23:04 -05:00
Chris PeBenito a2307ca2b9 Move module request line in mount. 2011-01-10 10:22:05 -05:00
Harry Ciao 4d8e9ffcb3 Make mount_t able to request loading kernel module.
Make the mount domain able to request kernel to load a kernel module.
Otherwise the binfmt_misc kernel module won't be properly loaded
during system booting up.

type=1400 audit(1292850971.104:4): avc:  denied  { module_request } for  pid=87 comm="mount" kmod="devtmpfs" scontext=system_u:system_r:mount_t:s0-s15:c0.c1023 tcontext=system_u:system_r:kernel_t:s15:c0.c1023 tclass=system

type=1400 audit(1292851024.844:13): avc:  denied  { module_request } for  pid=409 comm="mount" kmod="binfmt_misc" scontext=system_u:system_r:mount_t:s0-s15:c0.c1023 tcontext=system_u:system_r:kernel_t:s15:c0.c1023 tclass=system

Signed-off-by: Harry Ciao <qingtao.cao@windriver.com>
2011-01-10 10:20:21 -05:00
Chris PeBenito decb7de030 Module version bump and changelog for semanage update from Harry Ciao. 2011-01-10 09:21:11 -05:00
Chris PeBenito 60a2ca249e Remove redundant semanage rule. 2011-01-10 09:20:39 -05:00
Harry Ciao f2b3338362 semanage_t able to read from user homedirs.
Make semanage_t able to read from user homedirs or /tmp. Otherwise it
would fail to upgrade a .pp installed in there with below error messages.

BTW, semanage_t should be able to upgrade existing pp no matter if the
MLS is enabled or not.

root@qemu-host:/root> semodule -u selinuxutil.pp
type=1400 audit(1288862875.298:60): avc:  denied  { search } for  pid=759 comm="semodule" name="root" dev=sda ino=81921 scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023 tcontext=root:object_r:user_home_dir_t:s0-s15:c0.c1023 tclass=dir
semodule:  Failed on selinuxutil.pp!
root@qemu-host:/root> setenforce 0
type=1404 audit(1288862957.386:61): enforcing=0 old_enforcing=1 auid=4294967295 ses=4294967295
root@qemu-host:/root> semodule -u selinuxutil.pp
type=1400 audit(1288862959.494:62): avc:  denied  { search } for  pid=761 comm="semodule" name="root" dev=sda ino=81921 scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023 tcontext=root:object_r:user_home_dir_t:s0-s15:c0.c1023 tclass=dir
type=1400 audit(1288862959.498:63): avc:  denied  { read } for  pid=761 comm="semodule" name="selinuxutil.pp" dev=sda ino=82505 scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023 tcontext=root:object_r:user_home_t:s0 tclass=file
type=1400 audit(1288862959.503:64): avc:  denied  { open } for  pid=761 comm="semodule" name="selinuxutil.pp" dev=sda ino=82505 scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023 tcontext=root:object_r:user_home_t:s0 tclass=file
type=1400 audit(1288862959.507:65): avc:  denied  { getattr } for  pid=761 comm="semodule" path="/root/selinuxutil.pp" dev=sda ino=82505 scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023 tcontext=root:object_r:user_home_t:s0 tclass=file
type=1403 audit(1288863419.918:66): policy loaded auid=4294967295 ses=4294967295
root@qemu-host:/root>

Signed-off-by: Harry Ciao <qingtao.cao@windriver.com>
2011-01-10 09:13:23 -05:00
Chris PeBenito 7c4fbeba94 Fixes for samhain init_system_domain() usage. 2010-12-16 09:03:51 -05:00
Chris PeBenito 7a15ba8bae Whitespace fixes in init. 2010-12-15 14:50:28 -05:00
Chris PeBenito 0233fc5126 Rearrange distro blocks in init.fc 2010-12-15 14:48:43 -05:00
Chris Richards f40d6d4915 Fix OpenRC status dir labeling for Gentoo
Signed-off-by: Chris Richards <gizmo@giz-works.com>
2010-12-15 14:44:51 -05:00
Chris Richards 9951061f90 Fix OpenRC status dir labeling for Gentoo
Current policy sets /lib(32|64)?/rc/init.d to lib_t.  This causes
problems for DHCP among other things, as the initrc domain does not
have permissions to perform some operations.  Changing to
initrc_state_t (the labeling used for /var/lib/init.d by
the older baselayout-1) resolves some of these issues.

Signed-off-by: Chris Richards <gizmo@giz-works.com>
2010-12-15 14:44:40 -05:00
Chris PeBenito ff449b62d7 Reorder samhain call in userdomain. 2010-12-15 11:02:29 -05:00
Harry Ciao b2f8897d9c Add support for the samhain program.
Note, extra privileges may need to be granted to the samhain domain
if its default configuration file(/etc/samhainrc) is changed.

The samhain program could be used in the following way:

(In secadm_r role)
1. Initialize filesystem signature database:
newrole -l s15:c0.c1023 -p -- -c "samhain -t init"

(Note, the current secadm console will be blocked until
the database is completed)

2. Start samhain deamon to check filesystem integrity
newrole -l s15:c0.c1023 -p -- -c "samhain -t check -D"

3. Update filesystem signature database:
newrole -l s15:c0.c1023 -p -- -c "samhain -t update"

(In sysadm_r role)
1. Start samhain in daemon mode:
run_init /etc/init.d/samhain start

2. Stop samhain daemon:
run_init /etc/init.d/samhain stop

3. Check samhain daemon status:
run_init /etc/init.d/samhain status

4. Read/write samhain log files:
newrole -l s15:c0.c1023 -p -- -c "cat /var/log/samhain_log"

5. Remove samhain database files
newrole -l s15:c0.c1023 -p -- -c "rm /var/lib/samhain/samhain_file"

Note:
1. Stop samhain daemon before updating signature database.
2. Don't try to start samhain daemon twice.
3. Need to toggle SELinux into the Permissive mode in order to remove
   the samhain_log files from /var/log/.

Signed-off-by: Harry Ciao <qingtao.cao@windriver.com>
2010-12-15 10:57:12 -05:00
Chris PeBenito 826d014241 Bump module versions for release. 2010-12-13 09:12:22 -05:00
Chris PeBenito f920903264 Module version bump for hostname. 2010-11-17 09:30:44 -05:00
Chris PeBenito 8b61886e56 Module version bump for miscfiles. 2010-11-17 09:30:44 -05:00
Chris PeBenito a2e8969d04 Additional miscfiles tweaks. 2010-11-17 09:30:44 -05:00
Jeremy Solt d19a291e4e system_miscfiles patch from Dan Walsh
"move cobbler, Allow policy to define certs."
2010-11-17 09:30:44 -05:00
Jeremy Solt 7121e45e00 hostname patch from Dan Walsh
"Hostname access Seems to attract leaks."

Edits:
 - No dontaudit_leaks in refpolicy, dropped those interface calls, leaving only nis_use_ypbind
2010-11-17 09:30:44 -05:00
Chris PeBenito 52f38d23c9 Module version bump for Chris Richards' mount patchset. 2010-11-11 09:48:01 -05:00
Chris PeBenito 66ef236c90 Minor fixes for Chris Richards' mount patchset. 2010-11-11 09:47:37 -05:00