Bug 523771

Summary: SNMP policy interface needs a macro to provide append for snmpd_var_lib_t
Product: [Fedora] Fedora Reporter: Nathan Kinder <nkinder>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-28 14:24:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Nathan Kinder 2009-09-16 16:05:42 UTC
One thing I found that would be nice to address in the via the snmp policy
interface is a macro that allows the following:

  allow dirsrv_snmp_t snmpd_var_lib_t:file append;

For Net-SNMP subagents, a persistent data file is created in /var/net-snmp with
a label of snmp_var_lib_t.  When the subagent is stopped, the Net-SNMP
libraries try to append to that file, which will trigger an AVC.

There is a snmp_dontaudit_write_snmp_var_lib_files macro available that allows
write permission, but not append.  I defer to you to decide if it's best to add
append permission to this macro or if it is better to introduce a new macro.

Comment 1 Daniel Walsh 2009-09-16 16:22:51 UTC
Miroslav add

########################################
## <summary>
##	Append snmpd libraries.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`snmp_append_snmp_var_lib_files',`
	gen_require(`
		type snmpd_var_lib_t;
	')

	append_files_pattern($1, snmpd_var_lib_t, snmpd_var_lib_t)
')

Comment 2 Miroslav Grepl 2009-09-22 18:10:48 UTC
Fixed in selinux-policy-3.6.12-84.fc11

Comment 4 Bug Zapper 2010-04-28 10:24:47 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping