From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 807DC138010 for ; Wed, 17 Oct 2012 17:43:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF795E0459; Wed, 17 Oct 2012 17:41:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DECDCE032F for ; Wed, 17 Oct 2012 17:41:16 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 43F5D33D80C for ; Wed, 17 Oct 2012 17:41:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 2B7EDE5451 for ; Wed, 17 Oct 2012 17:41:14 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1350495513.ba72963de8de8dd2db70e0e9658a3b545cce5534.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/pads.if policy/modules/contrib/pads.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: ba72963de8de8dd2db70e0e9658a3b545cce5534 X-VCS-Branch: master Date: Wed, 17 Oct 2012 17:41:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 38ea3deb-b5fe-44a1-8003-c52a0b87a924 X-Archives-Hash: 1e597973eeec9d27d3ca82f718478bce commit: ba72963de8de8dd2db70e0e9658a3b545cce5534 Author: Dominick Grift gmail com> AuthorDate: Wed Oct 17 09:33:25 2012 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Wed Oct 17 17:38:33 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=ba72963d Changes to the pads policy module Ported from Fedora with changes Signed-off-by: Dominick Grift gmail.com> --- policy/modules/contrib/pads.if | 21 ++++++++------------- policy/modules/contrib/pads.te | 15 +++++++++------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/policy/modules/contrib/pads.if b/policy/modules/contrib/pads.if index 8ac407e..6e097c9 100644 --- a/policy/modules/contrib/pads.if +++ b/policy/modules/contrib/pads.if @@ -1,17 +1,9 @@ -## Passive Asset Detection System -## -##

-## PADS is a libpcap based detection engine used to -## passively detect network assets. It is designed to -## complement IDS technology by providing context to IDS -## alerts. -##

-##
+## Passive Asset Detection System. ######################################## ## -## All of the rules required to administrate -## an pads environment +## All of the rules required to +## administrate an pads environment. ## ## ## @@ -27,8 +19,8 @@ # interface(`pads_admin', ` gen_require(` - type pads_t, pads_config_t; - type pads_var_run_t, pads_initrc_exec_t; + type pads_t, pads_config_t, pads_var_run_t; + type pads_initrc_exec_t; ') allow $1 pads_t:process { ptrace signal_perms }; @@ -39,6 +31,9 @@ interface(`pads_admin', ` role_transition $2 pads_initrc_exec_t system_r; allow $2 system_r; + files_search_pids($1) admin_pattern($1, pads_var_run_t) + + files_search_etc($1) admin_pattern($1, pads_config_t) ') diff --git a/policy/modules/contrib/pads.te b/policy/modules/contrib/pads.te index b246bdd..29a7364 100644 --- a/policy/modules/contrib/pads.te +++ b/policy/modules/contrib/pads.te @@ -1,4 +1,4 @@ -policy_module(pads, 1.0.0) +policy_module(pads, 1.0.1) ######################################## # @@ -8,7 +8,7 @@ policy_module(pads, 1.0.0) type pads_t; type pads_exec_t; init_daemon_domain(pads_t, pads_exec_t) -role system_r types pads_t; +application_executable_file(pads_exec_t) type pads_initrc_exec_t; init_script_file(pads_initrc_exec_t) @@ -25,10 +25,8 @@ files_pid_file(pads_var_run_t) # allow pads_t self:capability { dac_override net_raw }; -allow pads_t self:netlink_route_socket { write getattr read bind create nlmsg_read }; -allow pads_t self:packet_socket { ioctl setopt getopt read bind create }; -allow pads_t self:udp_socket { create ioctl }; -allow pads_t self:unix_dgram_socket { write create connect }; +allow pads_t self:packet_socket create_socket_perms; +allow pads_t self:socket create_socket_perms; allow pads_t pads_config_t:file manage_file_perms; files_etc_filetrans(pads_t, pads_config_t, file) @@ -37,6 +35,7 @@ allow pads_t pads_var_run_t:file manage_file_perms; files_pid_filetrans(pads_t, pads_var_run_t, file) kernel_read_sysctl(pads_t) +kernel_read_network_state(pads_t) corecmd_search_bin(pads_t) @@ -44,10 +43,14 @@ corenet_all_recvfrom_unlabeled(pads_t) corenet_all_recvfrom_netlabel(pads_t) corenet_tcp_sendrecv_generic_if(pads_t) corenet_tcp_sendrecv_generic_node(pads_t) + +corenet_sendrecv_prelude_client_packets(pads_t) corenet_tcp_connect_prelude_port(pads_t) +corenet_tcp_sendrecv_prelude_port(pads_t) dev_read_rand(pads_t) dev_read_urand(pads_t) +dev_read_sysfs(pads_t) files_read_etc_files(pads_t) files_search_spool(pads_t)