LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 03-18-2013, 10:59 AM   #1
nico8948
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
snmpd selinux


In /etc/snmpd/snmpd.conf i use the following extend:
extend .1.3.6.1.4.1.2021.104 messages /usr/bin/tail -50 /var/log/messages

I get the following error:
type=1400 audit(1363618432.212:84979): avc: denied { read } for pid=24076 comm="tail" name="messages" dev=dm-9 ino=123 scontext=unconfined_u:system_r:snmpd_t:s0 tcontext=system_ubject_r:var_log_t:s0 tclass=file

Do someone how to give snmpd permission to access /var/log/messages with chcon?

thanks
 
Old 03-18-2013, 03:19 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Quote:
Originally Posted by nico8948 View Post
Do someone how to give snmpd permission to access /var/log/messages with chcon?
It's not a case of mucking with contexts in that way and if you pipe the message through 'audit2allow' you'll get this custom policy rule you can load:
Code:
#============= snmpd_t ==============
allow snmpd_t var_log_t:file read;
See 'man audit2allow' (the "-M" flag) and 'man semodule' (the "-i" flag).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SELinux module to allow snmpd to write to /tmp gimpy530 Linux - Security 9 02-27-2012 03:36 PM
Selinux-how do i find out what domains have permissions on what type?(selinux policy) vishyc88 Linux - Security 2 11-22-2010 05:27 AM
Can't get snmpd working on selinux system ChrisBartram Linux - Security 4 09-01-2008 01:46 PM
doing /etc/init.d/snmpd status gives "snmpd dead but pid file exists" kaushal143 Linux - Newbie 2 07-10-2008 03:55 AM
snmpd: relocation error snmpd:undefined symbol: lastAddrAge Strike2000 Slackware 0 02-11-2008 05:45 AM


All times are GMT -5. The time now is 03:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration