Bug 426450

Summary: selinux prevents btmp records from being written by default
Product: [Fedora] Fedora Reporter: Máirín Duffy <duffy>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
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: 2007-12-26 16:37:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Máirín Duffy 2007-12-21 03:50:22 UTC
Description of problem:

tried to run /sbin/lastb to investigate a compromised system, and it seems it
was blank. got an selinux alert that SELinux is preventing /usr/sbin/sshd
(sshd_t) "append" to (var_log_t)

raw audit message:

avc: denied {append } for comm=sshd dev=dm-0 egid=0 euid=0 exe=/usr/bin/ssd
exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name=btmp pid=13037
scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 sgid=0
subj=system_u;system_r:sshd_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=unconfined_u:object_r:var_log_t:s0 tty=(none) uid=0

Comment 1 Daniel Walsh 2007-12-21 07:19:05 UTC
restorecon -R -v /var/log/btmp

Should fix.  Any idea how this got mislabeled?