diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-02-05 20:41:06 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-02-05 20:41:06 +0000 |
commit | 7297073f9ae00bd1ff8f3261597591a9d73c2788 (patch) | |
tree | cc6bda71ac9301019ec59688a631926ecf3f3512 /sec-policy/selinux-skype | |
parent | Add ~amd64-linux/~x86-linux, use ED instead of D in a couple places (diff) | |
download | gentoo-2-7297073f9ae00bd1ff8f3261597591a9d73c2788.tar.gz gentoo-2-7297073f9ae00bd1ff8f3261597591a9d73c2788.tar.bz2 gentoo-2-7297073f9ae00bd1ff8f3261597591a9d73c2788.zip |
Bulk addition of new selinux policies.
(Portage version: 2.1.9.25/cvs/Linux x86_64)
Diffstat (limited to 'sec-policy/selinux-skype')
-rw-r--r-- | sec-policy/selinux-skype/ChangeLog | 19 | ||||
-rw-r--r-- | sec-policy/selinux-skype/files/add-apps-skype-r2.patch | 106 | ||||
-rw-r--r-- | sec-policy/selinux-skype/files/add-apps-skype.patch | 102 | ||||
-rw-r--r-- | sec-policy/selinux-skype/files/add-skype.patch | 103 | ||||
-rw-r--r-- | sec-policy/selinux-skype/metadata.xml | 10 | ||||
-rw-r--r-- | sec-policy/selinux-skype/selinux-skype-2.20101213-r1.ebuild | 16 | ||||
-rw-r--r-- | sec-policy/selinux-skype/selinux-skype-2.20101213-r2.ebuild | 16 | ||||
-rw-r--r-- | sec-policy/selinux-skype/selinux-skype-2.20101213.ebuild | 16 |
8 files changed, 388 insertions, 0 deletions
diff --git a/sec-policy/selinux-skype/ChangeLog b/sec-policy/selinux-skype/ChangeLog new file mode 100644 index 000000000000..9a6d1e425f67 --- /dev/null +++ b/sec-policy/selinux-skype/ChangeLog @@ -0,0 +1,19 @@ +# ChangeLog for sec-policy/selinux-skype +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-skype/ChangeLog,v 1.1 2011/02/05 20:41:03 blueness Exp $ + + 05 Feb 2011; Anthony G. Basile <blueness@gentoo.org> ChangeLog: + Initial commit to portage. + +*selinux-skype-2.20101213-r2 (31 Jan 2011) + + 31 Jan 2011; <swift@gentoo.org> +files/add-apps-skype-r2.patch, + +selinux-skype-2.20101213-r2.ebuild: + Allow userhome access, set some dontaudits etc. + +*selinux-skype-2.20101213-r1 (22 Jan 2011) + + 22 Jan 2011; <swift@gentoo.org> +selinux-skype-2.20101213-r1.ebuild, + +files/add-apps-skype.patch: + Update skype module to 'comply' with suggested approach for domains + diff --git a/sec-policy/selinux-skype/files/add-apps-skype-r2.patch b/sec-policy/selinux-skype/files/add-apps-skype-r2.patch new file mode 100644 index 000000000000..95b6674334f1 --- /dev/null +++ b/sec-policy/selinux-skype/files/add-apps-skype-r2.patch @@ -0,0 +1,106 @@ +--- apps/skype.te 1970-01-01 01:00:00.000000000 +0100 ++++ apps/skype.te 2011-01-30 16:17:19.481000177 +0100 +@@ -0,0 +1,97 @@ ++policy_module(skype, 0.0.2) ++ ++############################ ++# ++# Declarations ++# ++ ++type skype_t; ++type skype_exec_t; ++application_domain(skype_t, skype_exec_t) ++ ++type skype_home_t; ++ ++type skype_tmpfs_t; ++files_tmpfs_file(skype_tmpfs_t) ++ubac_constrained(skype_tmpfs_t) ++ ++############################ ++# ++# Policy ++# ++ ++allow skype_t self:process { getsched setsched execmem }; ++allow skype_t self:fifo_file rw_fifo_file_perms; ++allow skype_t self:unix_stream_socket create_socket_perms; ++allow skype_t self:sem create_sem_perms; ++allow skype_t self:tcp_socket create_stream_socket_perms; ++ ++ ++manage_dirs_pattern(skype_t, skype_home_t, skype_home_t) ++manage_files_pattern(skype_t, skype_home_t, skype_home_t) ++manage_lnk_files_pattern(skype_t, skype_home_t, skype_home_t) ++userdom_user_home_dir_filetrans(skype_t, skype_home_t, dir) ++userdom_user_home_content(skype_home_t) ++ ++manage_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_lnk_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_fifo_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_sock_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++fs_tmpfs_filetrans(skype_t, skype_tmpfs_t, { file lnk_file sock_file fifo_file }) ++ ++ ++kernel_read_system_state(skype_t) ++ ++can_exec(skype_t, skype_exec_t) ++corecmd_exec_bin(skype_t) ++corecmd_exec_shell(skype_t) ++corenet_all_recvfrom_netlabel(skype_t) ++corenet_all_recvfrom_unlabeled(skype_t) ++corenet_tcp_bind_generic_node(skype_t) ++corenet_udp_bind_generic_node(skype_t) ++corenet_tcp_bind_generic_port(skype_t) ++corenet_udp_bind_generic_port(skype_t) ++corenet_tcp_connect_generic_port(skype_t) ++corenet_tcp_connect_http_port(skype_t) ++corenet_tcp_sendrecv_http_port(skype_t) ++corenet_sendrecv_http_client_packets(skype_t) ++dev_read_sound(skype_t) ++dev_read_video_dev(skype_t) ++dev_write_sound(skype_t) ++dev_write_video_dev(skype_t) ++files_read_etc_files(skype_t) ++files_read_usr_files(skype_t) ++ ++ ++auth_use_nsswitch(skype_t) ++domain_use_interactive_fds(skype_t) ++libs_use_ld_so(skype_t) ++miscfiles_dontaudit_setattr_fonts_dirs(skype_t) ++miscfiles_read_localization(skype_t) ++userdom_manage_user_home_content_dirs(skype_t) ++userdom_manage_user_home_content_files(skype_t) ++userdom_use_user_terminals(skype_t) ++ ++ ++xserver_user_x_domain_template(skype, skype_t, skype_tmpfs_t) ++ ++tunable_policy(`gentoo_try_dontaudit',` ++ dev_dontaudit_search_sysfs(skype_t) ++ fs_dontaudit_getattr_xattr_fs(skype_t) ++') ++ ++optional_policy(` ++ tunable_policy(`gentoo_try_dontaudit',` ++ mozilla_dontaudit_manage_user_home_files(skype_t) ++ ') ++') ++ ++optional_policy(` ++ alsa_read_rw_config(skype_t) ++') ++ ++optional_policy(` ++ dbus_system_bus_client(skype_t) ++ dbus_session_bus_client(skype_t) ++') ++ +--- apps/skype.fc 1970-01-01 01:00:00.000000000 +0100 ++++ apps/skype.fc 2011-01-09 21:27:25.364999962 +0100 +@@ -0,0 +1,3 @@ ++/usr/bin/skype -- gen_context(system_u:object_r:skype_exec_t,s0) ++/opt/skype/skype -- gen_context(system_u:object_r:skype_exec_t,s0) ++HOME_DIR/\.Skype(/.*)? gen_context(system_u:object_r:skype_home_t,s0) diff --git a/sec-policy/selinux-skype/files/add-apps-skype.patch b/sec-policy/selinux-skype/files/add-apps-skype.patch new file mode 100644 index 000000000000..1fc492a733fa --- /dev/null +++ b/sec-policy/selinux-skype/files/add-apps-skype.patch @@ -0,0 +1,102 @@ +--- apps/skype.te 1970-01-01 01:00:00.000000000 +0100 ++++ apps/skype.te 2011-01-22 14:21:31.257000064 +0100 +@@ -0,0 +1,93 @@ ++policy_module(skype, 1.0.1) ++ ++############################ ++# ++# Declarations ++# ++ ++type skype_t; ++type skype_exec_t; ++application_domain(skype_t, skype_exec_t) ++ ++type skype_home_t; ++userdom_user_home_content(skype_home_t) ++ ++type skype_tmpfs_t; ++files_tmpfs_file(skype_tmpfs_t) ++ubac_constrained(skype_tmpfs_t) ++ ++############################ ++# ++# Policy ++# ++ ++allow skype_t self:process { getsched setsched }; ++allow skype_t self:fifo_file rw_fifo_file_perms; ++allow skype_t self:unix_stream_socket create_socket_perms; ++allow skype_t self:sem create_sem_perms; ++ ++manage_dirs_pattern(skype_t, skype_home_t, skype_home_t) ++manage_files_pattern(skype_t, skype_home_t, skype_home_t) ++manage_lnk_files_pattern(skype_t, skype_home_t, skype_home_t) ++userdom_user_home_dir_filetrans(skype_t, skype_home_t, dir) ++ ++userdom_manage_user_home_content_dirs(skype_t) ++userdom_manage_user_home_content_files(skype_t) ++ ++manage_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_lnk_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_fifo_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_sock_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++fs_tmpfs_filetrans(skype_t, skype_tmpfs_t, { file lnk_file sock_file fifo_file }) ++ ++can_exec(skype_t, skype_exec_t) ++ ++kernel_read_system_state(skype_t) ++ ++corecmd_exec_bin(skype_t) ++corecmd_exec_shell(skype_t) ++ ++corenet_all_recvfrom_netlabel(skype_t) ++corenet_all_recvfrom_unlabeled(skype_t) ++corenet_tcp_bind_generic_node(skype_t) ++corenet_udp_bind_generic_node(skype_t) ++corenet_tcp_bind_generic_port(skype_t) ++corenet_udp_bind_generic_port(skype_t) ++corenet_tcp_connect_generic_port(skype_t) ++corenet_tcp_connect_http_port(skype_t) ++corenet_tcp_sendrecv_http_port(skype_t) ++corenet_sendrecv_http_client_packets(skype_t) ++allow skype_t self:tcp_socket create_stream_socket_perms; ++ ++dev_read_video_dev(skype_t) ++dev_write_video_dev(skype_t) ++dev_read_sound(skype_t) ++dev_write_sound(skype_t) ++ ++domain_use_interactive_fds(skype_t) ++ ++files_read_etc_files(skype_t) ++files_read_usr_files(skype_t) ++ ++auth_use_nsswitch(skype_t) ++ ++libs_use_ld_so(skype_t) ++ ++miscfiles_read_localization(skype_t) ++miscfiles_dontaudit_setattr_fonts_dirs(skype_t) ++ ++userdom_use_user_terminals(skype_t) ++ ++xserver_user_x_domain_template(skype, skype_t, skype_tmpfs_t) ++ ++allow skype_t self:process { execmem }; ++ ++optional_policy(` ++ alsa_read_rw_config(skype_t) ++') ++ ++optional_policy(` ++ dbus_system_bus_client(skype_t) ++ dbus_session_bus_client(skype_t) ++') ++ +--- apps/skype.fc 1970-01-01 01:00:00.000000000 +0100 ++++ apps/skype.fc 2011-01-09 21:27:25.364999962 +0100 +@@ -0,0 +1,3 @@ ++/usr/bin/skype -- gen_context(system_u:object_r:skype_exec_t,s0) ++/opt/skype/skype -- gen_context(system_u:object_r:skype_exec_t,s0) ++HOME_DIR/\.Skype(/.*)? gen_context(system_u:object_r:skype_home_t,s0) diff --git a/sec-policy/selinux-skype/files/add-skype.patch b/sec-policy/selinux-skype/files/add-skype.patch new file mode 100644 index 000000000000..493ef2232a64 --- /dev/null +++ b/sec-policy/selinux-skype/files/add-skype.patch @@ -0,0 +1,103 @@ +--- apps/skype.te 1970-01-01 01:00:00.000000000 +0100 ++++ ../../../refpolicy/policy/modules/apps/skype.te 2011-01-08 00:23:10.900000094 +0100 +@@ -0,0 +1,94 @@ ++policy_module(skype, 1.0.0) ++ ++############################ ++# ++# Declarations ++# ++ ++ ++type skype_t; ++type skype_exec_t; ++typealias skype_t alias { user_skype_t staff_skype_t sysadm_skype_t }; ++application_domain(skype_t, skype_exec_t) ++ ++type skype_home_t; ++typealias skype_home_t alias { user_skype_home_t staff_skype_home_t sysadm_skype_home_t }; ++userdom_user_home_content(skype_home_t) ++ ++type skype_tmpfs_t; ++typealias skype_tmpfs_t alias { user_skype_tmpfs_t staff_skype_tmpfs_t sysadm_skype_tmpfs_t }; ++files_tmpfs_file(skype_tmpfs_t) ++ubac_constrained(skype_tmpfs_t) ++ ++############################ ++# ++# Local policy ++# ++ ++# Looks as if the binary needs this; for the time being use the tunable policy ++tunable_policy(`allow_execmem',` ++ allow skype_t self:process { execmem }; ++') ++ ++# Manage ~/.Skype ++manage_dirs_pattern(skype_t, skype_home_t, skype_home_t) ++manage_files_pattern(skype_t, skype_home_t, skype_home_t) ++manage_lnk_files_pattern(skype_t, skype_home_t, skype_home_t) ++userdom_user_home_dir_filetrans(skype_t, skype_home_t, dir) ++userdom_search_user_home_dirs(skype_t) ++ ++# Declare access permissions on skype_tmpfs_t domain for X sessions ++manage_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_lnk_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_fifo_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++manage_sock_files_pattern(skype_t, skype_tmpfs_t, skype_tmpfs_t) ++fs_tmpfs_filetrans(skype_t, skype_tmpfs_t, { file lnk_file sock_file fifo_file }) ++ ++# Be able to call skype from a terminal (debugging) ++userdom_use_user_terminals(skype_t) ++domain_use_interactive_fds(skype_t) ++ ++corecmd_exec_bin(skype_t) ++corecmd_exec_shell(skype_t) ++can_exec(skype_t, skype_exec_t) ++#exec_files_pattern(skype_t, skype_exec_t, skype_exec_t) ++libs_use_ld_so(skype_t) ++files_read_usr_symlinks(skype_t) ++ ++# This is an X application ++xserver_user_x_domain_template(skype, skype_t, skype_tmpfs_t) ++ ++files_search_var_lib(skype_t) ++miscfiles_read_fonts(skype_t) ++miscfiles_read_localization(skype_t) ++miscfiles_dontaudit_setattr_fonts_dirs(skype_t) ++dbus_system_bus_client(skype_t) ++files_read_etc_files(skype_t) ++libs_read_lib_files(skype_t) ++ ++corenet_tcp_bind_generic_node(skype_t) ++corenet_udp_bind_generic_node(skype_t) ++corenet_tcp_bind_generic_port(skype_t) ++corenet_udp_bind_generic_port(skype_t) ++corenet_tcp_connect_generic_port(skype_t) ++corenet_tcp_connect_http_port(skype_t) ++ ++dev_read_video_dev(skype_t) ++dev_write_video_dev(skype_t) ++dev_read_sound(skype_t) ++dev_write_sound(skype_t) ++alsa_read_rw_config(skype_t) ++ ++files_read_usr_files(skype_t) ++kernel_read_system_state(skype_t) ++sysnet_read_config(skype_t) ++ ++# Self ++allow skype_t self:process { getsched }; ++allow skype_t self:unix_stream_socket create_socket_perms; ++allow skype_t self:udp_socket create_stream_socket_perms; ++allow skype_t self:tcp_socket create_stream_socket_perms; ++allow skype_t self:sem create_sem_perms; ++allow skype_t self:netlink_route_socket rw_netlink_socket_perms; ++allow skype_t self:fifo_file rw_fifo_file_perms; ++ +--- apps/skype.fc 1970-01-01 01:00:00.000000000 +0100 ++++ ../../../refpolicy/policy/modules/apps/skype.fc 2011-01-07 21:46:47.603999891 +0100 +@@ -0,0 +1,3 @@ ++/usr/bin/skype -- gen_context(system_u:object_r:skype_exec_t,s0) ++/opt/skype/skype -- gen_context(system_u:object_r:skype_exec_t,s0) ++HOME_DIR/\.Skype(/.*)? gen_context(system_u:object_r:skype_home_t,s0) diff --git a/sec-policy/selinux-skype/metadata.xml b/sec-policy/selinux-skype/metadata.xml new file mode 100644 index 000000000000..3d9f93061222 --- /dev/null +++ b/sec-policy/selinux-skype/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>hardened</herd> +<maintainer> + <email>selinux@gentoo.org</email> +</maintainer> +<longdescription>Gentoo SELinux policy for skype.</longdescription> +</pkgmetadata> + diff --git a/sec-policy/selinux-skype/selinux-skype-2.20101213-r1.ebuild b/sec-policy/selinux-skype/selinux-skype-2.20101213-r1.ebuild new file mode 100644 index 000000000000..00f463e78458 --- /dev/null +++ b/sec-policy/selinux-skype/selinux-skype-2.20101213-r1.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-skype/selinux-skype-2.20101213-r1.ebuild,v 1.1 2011/02/05 20:41:03 blueness Exp $ + +IUSE="" + +MODS="skype" + +inherit selinux-policy-2 + +DESCRIPTION="SELinux policy for general applications" + +KEYWORDS="~amd64 ~x86" + +POLICY_PATCH="${FILESDIR}/add-apps-skype.patch" +RDEPEND=">=sec-policy/selinux-base-policy-2.20101213-r4" diff --git a/sec-policy/selinux-skype/selinux-skype-2.20101213-r2.ebuild b/sec-policy/selinux-skype/selinux-skype-2.20101213-r2.ebuild new file mode 100644 index 000000000000..d4f1b790446b --- /dev/null +++ b/sec-policy/selinux-skype/selinux-skype-2.20101213-r2.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-skype/selinux-skype-2.20101213-r2.ebuild,v 1.1 2011/02/05 20:41:03 blueness Exp $ + +IUSE="" + +MODS="skype" + +inherit selinux-policy-2 + +DESCRIPTION="SELinux policy for general applications" + +KEYWORDS="~amd64 ~x86" + +POLICY_PATCH="${FILESDIR}/add-apps-skype-r2.patch" +RDEPEND=">=sec-policy/selinux-base-policy-2.20101213-r4" diff --git a/sec-policy/selinux-skype/selinux-skype-2.20101213.ebuild b/sec-policy/selinux-skype/selinux-skype-2.20101213.ebuild new file mode 100644 index 000000000000..d08539a83afb --- /dev/null +++ b/sec-policy/selinux-skype/selinux-skype-2.20101213.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-skype/selinux-skype-2.20101213.ebuild,v 1.1 2011/02/05 20:41:03 blueness Exp $ + +IUSE="" + +MODS="skype" + +inherit selinux-policy-2 + +DESCRIPTION="SELinux policy for general applications" + +KEYWORDS="~amd64 ~x86" + +POLICY_PATCH="${FILESDIR}/add-skype.patch" +RDEPEND=">=sec-policy/selinux-base-policy-2.20101213-r3" |