All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] new policy for dkim-filter
@ 2009-09-10 19:40 Stefan Schulze Frielinghaus
  2009-09-10 20:04 ` Paul Howarth
  0 siblings, 1 reply; 18+ messages in thread
From: Stefan Schulze Frielinghaus @ 2009-09-10 19:40 UTC (permalink / raw)
  To: selinux; +Cc: Christopher J. PeBenito

[-- Attachment #1: Type: text/plain, Size: 100 bytes --]

Attached is a new policy for the dkim-filter application.

Chris, is the policy OK/ready for merge?

[-- Attachment #2: dkimfilter.fc --]
[-- Type: text/plain, Size: 239 bytes --]

/usr/sbin/dkim-filter	--	gen_context(system_u:object_r:dkimfilter_exec_t,s0)

/var/db/dkim(/.*)?		gen_context(system_u:object_r:dkimfilter_private_key_t,s0)
/var/run/dkim-filter(/.*)?	gen_context(system_u:object_r:dkimfilter_var_run_t,s0)

[-- Attachment #3: dkimfilter.if --]
[-- Type: text/plain, Size: 449 bytes --]

########################################
## <summary>
##      Connect to dkim-filter over an unix stream socket.
## </summary>
## <param name="domain">
##      <summary>
##      Domain allowed access.
##      </summary>
## </param>
#
interface(`dkimfilter_stream_connect',`
	gen_require(`
		type dkimfilter_t, dkimfilter_var_run_t;
	')

	files_search_pids($1)
	stream_connect_pattern($1, dkimfilter_var_run_t, dkimfilter_var_run_t, dkimfilter_t)
')

[-- Attachment #4: dkimfilter.te --]
[-- Type: text/plain, Size: 954 bytes --]


policy_module(dkimfilter, 1.0.0)

########################################
#
# Declarations
#

type dkimfilter_t;
type dkimfilter_exec_t;
init_daemon_domain(dkimfilter_t, dkimfilter_exec_t)

type dkimfilter_var_run_t;
files_pid_file(dkimfilter_var_run_t)

type dkimfilter_private_key_t;
files_type(dkimfilter_private_key_t)

########################################
#
# Local policy
#

allow dkimfilter_t self:capability { setgid setuid };

read_files_pattern(dkimfilter_t, dkimfilter_private_key_t, dkimfilter_private_key_t)
manage_files_pattern(dkimfilter_t, dkimfilter_var_run_t, dkimfilter_var_run_t)
manage_sock_files_pattern(dkimfilter_t, dkimfilter_var_run_t, dkimfilter_var_run_t)

files_read_etc_files(dkimfilter_t)

libs_read_lib_files(dkimfilter_t)

miscfiles_read_localization(dkimfilter_t)

logging_send_syslog_msg(dkimfilter_t)

dev_read_urand(dkimfilter_t)

kernel_read_kernel_sysctls(dkimfilter_t)

sysnet_dns_name_resolve(dkimfilter_t)

[-- Attachment #5: sendmail.te.diff --]
[-- Type: text/x-patch, Size: 454 bytes --]

diff --git a/policy/modules/services/sendmail.te b/policy/modules/services/sendmail.te
index f3f0d44..c102ecb 100644
--- a/policy/modules/services/sendmail.te
+++ b/policy/modules/services/sendmail.te
@@ -130,6 +130,10 @@ optional_policy(`
 	udev_read_db(sendmail_t)
 ')
 
+optional_policy(`
+	dkimfilter_stream_connect(sendmail_t)
+')
+
 ifdef(`TODO',`
 allow sendmail_t etc_mail_t:dir rw_dir_perms;
 allow sendmail_t etc_mail_t:file manage_file_perms;

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-09-17 13:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-10 19:40 [refpolicy] new policy for dkim-filter Stefan Schulze Frielinghaus
2009-09-10 20:04 ` Paul Howarth
2009-09-10 20:39   ` Stefan Schulze Frielinghaus
2009-09-10 21:50     ` Stefan Schulze Frielinghaus
2009-09-10 22:27       ` Paul Howarth
2009-09-11  7:53         ` Stefan Schulze Frielinghaus
2009-09-11  8:20           ` Stefan Schulze Frielinghaus
2009-09-11 12:30             ` Chris PeBenito
2009-09-11 12:46               ` Stefan Schulze Frielinghaus
2009-09-11 14:22               ` Stefan Schulze Frielinghaus
2009-09-11 15:18                 ` Paul Howarth
2009-09-12 12:49                   ` Stefan Schulze Frielinghaus
2009-09-12 14:58                     ` Stefan Schulze Frielinghaus
2009-09-14 13:01                   ` Christopher J. PeBenito
2009-09-14 13:41                     ` Paul Howarth
2009-09-15 13:39                       ` Christopher J. PeBenito
2009-09-16 15:32                         ` Stefan Schulze Frielinghaus
2009-09-17 13:12                           ` Christopher J. PeBenito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.