LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-14-2008, 05:58 AM   #1
mysteron
LQ Newbie
 
Registered: Jun 2006
Posts: 26

Rep: Reputation: 0
Question Help, Selinux blocking append to named.log.


Hi.

I've got a server which is running CentOS5 and Selinux is activated on it. I've got one problem though. Selinux is blocking append access to named.log file in /var/log/.

Bind-chroot is being used.

What should I do in order to get append access to named.log file?


ls -laZ show:

-rw-r--r-- named named system_ubject_r:named_log_t /var/log/named.log


Extract from sealert message:

host=server.test.tld type=AVC msg=audit(1216019110.434:17676): avc: denied { append } for pid=2866 comm="named" name="named.log" dev=md1 ino=6508403 scontext=system_u:system_r:named_t:s0 tcontext=system_ubject_r:named_conf_t:s0 tclass=file

host=server.test.tld type=SYSCALL msg=audit(1216019110.434:17676): arch=40000003 syscall=5 success=no exit=-13 a0=b3237418 a1=441 a2=1b6 a3=b3314ce8 items=0 ppid=1 pid=2866 auid=4294967295 uid=25 gid=25 euid=25 suid=25 fsuid=25 egid=25 sgid=25 fsgid=25 tty=(none) ses=4294967295 comm="named" exe="/usr/sbin/named" subj=system_u:system_r:named_t:s0 key=(null)


I've tried running restorecon -v 'named.log', but that did not help either.


Regards,
/mysteron
 
Old 07-14-2008, 07:43 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Running the message through 'audit2allow' suggests adding a custom rule "allow named_t s0:file append;" to your local SELinux policy.
 
Old 07-15-2008, 07:01 AM   #3
mysteron
LQ Newbie
 
Registered: Jun 2006
Posts: 26

Original Poster
Rep: Reputation: 0
bind-chroot uninstall solution

Quote:
Originally Posted by unSpawn View Post
Running the message through 'audit2allow' suggests adding a custom rule "allow named_t s0:file append;" to your local SELinux policy.
Thank you for your reply. It seems that uninstalling bind-chroot also solves the log problem, but I wonder how safe it is to run bind with Selinux only protection and no chroot protection...

Found this info related to this issue with bind-chroot and logs.


/mysteron
 
  


Reply



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
ClamAV (Freshclam) config problem - cannot append to log file tp11235 Linux - Security 6 09-29-2006 03:54 PM
time --output=log.txt --append sadarax Linux - General 1 05-22-2006 08:46 AM
Where are the log files of named? Niceman2005 Linux - Software 3 12-14-2005 06:20 PM
SElinux / shutdown log linmix Linux - Software 0 09-23-2005 05:01 PM
Append error message to the log ust Linux - Software 0 05-23-2005 11:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration