LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-29-2008, 08:17 AM   #1
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
AVC Denial


Summary
SELinux is preventing /usr/sbin/useradd (useradd_t) "read write" to (var_log_t).

Detailed Description
SELinux denied access requested by /usr/sbin/useradd. It is not expected that this access is required by /usr/sbin/useradd and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access.

Allowing Access
Sometimes labeling problems can cause SELinux denials. You could try to restore the default system file context for , restorecon -v If this does not work, there is currently no automatic way to allow this access. Instead, you can generate a local policy module to allow this access - see FAQ.Or you can disable SELinux protection altogether. Disabling SELinux protection is not recommended. Please file a bug report against this package.

Additional Information
Code:
Source Context:  system_u:system_r:useradd_t:s0
Target Context:  system_u:object_r:var_log_t:s0
Target Objects:  None [ file ]
Affected RPM Packages:  shadow-utils-4.0.18.1-18.fc8 [application]
Policy RPM:  selinux-policy-3.0.8-44.fc8
Selinux Enabled:  True
Policy Type:  targeted
MLS Enabled:  True
Enforcing Mode:  Enforcing
Plugin Name:  plugins.catchall_file
Host Name:  localhost.localdomain
Platform:  Linux localhost.localdomain 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:55:12 EDT 2007 i686 i686
Alert Count:  2
First Seen:  Fri 28 Mar 2008 05:06:20 PM CET
Last Seen:  Fri 28 Mar 2008 05:06:34 PM CET
Local ID:  1bc9d871-7a93-4bdf-9e06-9522313b8f0d
Line Numbers:  
Raw Audit Messages :
avc: denied { read write } for comm=useradd dev=sda5 
egid=0 euid=0 exe=/usr/sbin/useradd exit=-13 
fsgid=0 fsuid=0 gid=0 items=0 name=faillog pid=7595 
scontext=system_u:system_r:useradd_t:s0 
sgid=0 subj=system_u:system_r:useradd_t:s0 suid=0 tclass=file tcontext=system_u:object_r:var_log_t:s0 tty=(none) uid=0
I didn't add any new user to the system,it's just two of us,me and me as root.I would like to know your opinion about this.Thanks.

Last edited by alan_ri; 03-29-2008 at 08:38 AM.
 
Old 03-31-2008, 08:52 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
Quote:
Originally Posted by alan_ri View Post
SELinux is preventing /usr/sbin/useradd (useradd_t) "read write" to (var_log_t).
AFAIK /var/log/faillog should not have type "var_log_t" but "faillog_t". Correct with 'chcon -t faillog_t /var/log/faillog'.


Quote:
Originally Posted by alan_ri View Post
I didn't add any new user to the system
Installing a package may include adding a system or unprivileged user. For example if the package was Apache (httpd.*.rpm) you could check running 'rpm -q --scripts httpd|less' and check where it reads "postinstall scriptlet". It may also have been something else like configuring the failure counter or limits ('man fiallog' for more nfo).
 
Old 03-31-2008, 09:43 AM   #3
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733

Original Poster
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by unSpawn View Post
AFAIK /var/log/faillog should not have type "var_log_t" but "faillog_t". Correct with 'chcon -t faillog_t /var/log/faillog'.
I don't think that I have to correct this,because application that I have installed(and I don't know yet which one it was that caused this AVC denial) "wanted" to write something in the /var/log,create a file and give some name to that file.It wasn't something that should go in /var/log/faillog.

Quote:
Originally Posted by unSpawn View Post
Installing a package may include adding a system or unprivileged user.
I knew that,I just wanted to make clear that no user(no app)was added to the system.

'rpm -q --scripts httpd|less'.It wasn't Apache,but I will use this command(with different input)and try to find out which application was responsible for this AVC denial.I'm still learning the command line.
Thanks for your help and interest.
 
Old 03-31-2008, 10:26 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by alan_ri View Post
application that I have installed (and I don't know yet which one it was that caused this AVC denial) "wanted" to write something in the /var/log, create a file and give some name to that file. It wasn't something that should go in /var/log/faillog.
The listed shadow-utils package doesn't execute scripts and the AVC message lists the source process as "comm=useradd, exe=/usr/sbin/useradd, scontext=system_u:system_r:useradd_t" and the target as "name=faillog, tclass=file and tcontext=system_ubject_r:var_log_t". So I'd be interested to know what other file there is in /var/log that would show up as "tclass=file, name=faillog"... Best start by checking which packages got installed recently. If you don't have 'rpm --last' then 'rpm -qa --qf='%{INSTALLTIME:date} %{NAME}\n'|sort -r|head -30' should work.
 
Old 03-31-2008, 02:25 PM   #5
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733

Original Poster
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
You're right.I didn't think this through as I should.Will try that sweet little command.
 
  


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
Nagios - SELinux AVC Denial davethemackem Linux - Software 1 09-26-2007 03:30 PM
Iptables, avc, SElinux erika_Dec2004 Fedora 1 01-15-2007 04:27 AM
audit avc : denied AlteRFirE Fedora 3 01-06-2007 09:32 AM
What's AVC? Tux-O-Matic Linux - General 6 12-11-2006 05:55 AM
Adaptec AVC 1100 slothpuck Linux - Hardware 0 12-23-2004 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:27 AM.

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