All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: "Christopher J. PeBenito" <cpebenito@tresys.com>,
	SE Linux <selinux@tycho.nsa.gov>
Subject: Re: pyzor/spam changes in policy
Date: Thu, 08 Mar 2007 09:02:42 -0500	[thread overview]
Message-ID: <45F01782.4030903@redhat.com> (raw)
In-Reply-To: <1173299356.10747.25.camel@sgc.columbia.tresys.com>

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

Christopher J. PeBenito wrote:
> On Mon, 2007-02-26 at 12:35 -0500, dwalsh@localhost.localdomain wrote:
>   
>> New directory for spamassin /var/lib/
>> spam needs to send signals to pyzor
>> pyzor uses tmp files
>>     
>
> Merged most,  exceptions:
>
>   
>> +interface(`spamassassin_manage_lib_files',`
>> +	gen_require(`
>> +		type spamd_var_lib_t;
>> +	')
>> +
>> +	files_search_var_lib($1)
>> +	manage_dirs_pattern($1,spamd_var_lib_t,spamd_var_lib_t)
>> +	manage_files_pattern($1,spamd_var_lib_t,spamd_var_lib_t)
>> +')
>>     
>
> Removed the dirs part.  If there is an interface needed that has both,
> then there should be a more abstract interface.
>
>   
>> @@ -139,6 +148,7 @@
>>  
>>  	tunable_policy(`spamd_enable_home_dirs',`
>>  		userdom_home_filetrans_generic_user_home_dir(spamd_t)
>> +		userdom_manage_generic_user_home_dirs(spamd_t)
>>  		userdom_manage_generic_user_home_content_dirs(spamd_t)
>>  		userdom_manage_generic_user_home_content_files(spamd_t)
>>  		userdom_manage_generic_user_home_content_symlinks(spamd_t)
>>     
>
> I don't understand why spamd_t would be creating new top level home
> diretories, for example the /home/myuser dir.
>
>   
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203290
>> @@ -184,6 +194,7 @@
>>  
>>  optional_policy(`
>>  	pyzor_domtrans(spamd_t)
>> +	pyzor_signal(spamd_t)
>>  ')
>>     
>
> Dropped this and the following, because the interface looks wrong ($1 is
> the object).
>
>   
>> +########################################
>> +## <summary>
>> +##	Send generic signals to pyzor
>> +## </summary>
>> +## <param name="domain">
>> +##	<summary>
>> +##	Domain allowed access.
>> +##	</summary>
>> +## </param>
>> +#
>> +interface(`pyzor_signal',`
>> +	gen_require(`
>> +		type pyzor_t;
>> +	')
>> +
>> +	allow pyzor_t $1:process signal;
>> +')
>>     
>
>   

This should be reversed,  New patch


[-- Attachment #2: spam.diff --]
[-- Type: text/x-patch, Size: 1410 bytes --]

--- nsaserefpolicy/policy/modules/services/spamassassin.te	2007-03-08 08:26:59.000000000 -0500
+++ serefpolicy-2.5.8/policy/modules/services/spamassassin.te	2007-03-08 09:00:04.000000000 -0500
@@ -85,6 +85,7 @@
 corenet_tcp_bind_all_nodes(spamd_t)
 corenet_tcp_bind_spamd_port(spamd_t)
 corenet_tcp_connect_razor_port(spamd_t)
+corenet_tcp_connect_smtp_port(spamd_t)
 corenet_sendrecv_razor_client_packets(spamd_t)
 corenet_sendrecv_spamd_server_packets(spamd_t)
 # spamassassin 3.1 needs this for its
@@ -147,6 +148,7 @@
 
 	tunable_policy(`spamd_enable_home_dirs',`
 		userdom_home_filetrans_generic_user_home_dir(spamd_t)
+		userdom_manage_generic_user_home_dirs(spamd_t)
 		userdom_manage_generic_user_home_content_dirs(spamd_t)
 		userdom_manage_generic_user_home_content_files(spamd_t)
 		userdom_manage_generic_user_home_content_symlinks(spamd_t)
--- nsaserefpolicy/policy/modules/services/pyzor.te	2007-03-08 08:26:59.000000000 -0500
+++ serefpolicy-2.5.8/policy/modules/services/pyzor.te	2007-03-08 08:59:23.000000000 -0500
@@ -44,6 +44,8 @@
 manage_dirs_pattern(pyzor_t,pyzor_tmp_t,pyzor_tmp_t)
 files_tmp_filetrans(pyzor_t, pyzor_tmp_t, { file dir })
 
+fs_search_auto_mountpoints(pyzor_t)
+
 kernel_read_kernel_sysctls(pyzor_t)  
 kernel_read_system_state(pyzor_t)
 
@@ -77,6 +79,7 @@
 ')
 
 optional_policy(`
+	spamassassin_signal_spamd(pyzor_t)
 	spamassassin_read_spamd_tmp_files(pyzor_t)
 ')
 

  reply	other threads:[~2007-03-08 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200702261735.l1QHZrjX030675@localhost.localdomain>
2007-03-07 20:29 ` pyzor/spam changes in policy Christopher J. PeBenito
2007-03-08 14:02   ` Daniel J Walsh [this message]
2007-03-08 16:41     ` Christopher J. PeBenito
2007-03-08 16:48       ` Daniel J Walsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45F01782.4030903@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=cpebenito@tresys.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.