Hide Forgot
Description of problem: 1. installed RHEL6.1-20110311.3 with mls policy 2. updated grub kernel line with console=ttyS0 3. opened console: virsh console rhel6-64 4. system start up logs into the console but I do not get the login prompt Following module fixes the problem for me but it is not probably the best solution. module mypoltty 1.0; require { type etc_t; type initrc_t; class file write; } #============= initrc_t ============== allow initrc_t etc_t:file write; Version-Release number of selected component (if applicable): selinux-policy-mls-3.7.19-78.el6 RHEL6.1-20110311.3 How reproducible: always Steps to Reproduce: above Actual results: no login prompt type=SYSCALL msg=audit(1300185968.999:7): arch=c000003e syscall=2 success=no exit=-13 a0=400f08 a1=2 a2=18 a3=7fff03200aa0 items=0 ppid=1 pid=1229 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="securetty" exe="/sbin/securetty" subj=system_u:system_r:initrc_t:s0-s15:c0.c1023 key=(null) type=AVC msg=audit(1300185968.999:7): avc: denied { write } for pid=1229 comm="securetty" name="securetty" dev=dm-0 ino=19310 scontext=system_u:system_r:initrc_t:s0-s15:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=file
securetty is trying to add "ttyS0" to /etc/securetty. 1. Is securetty supposed to do it in MLS? 2. I cannot login even if it is already there, this seems to be some initscript bug.
I do not think they are related. Not sure why you can not login via the console? What platform is this happing on? ppc?
Looks like we might need a policy for securetty
Or change the label on /etc/securetty to etc_runtime_t. chcon -t etc_runtime_t /etc/securetty Should elminate the AVC. Can you execute semodule -DB and see if their are avcs relabeled to console_device_t when you login?
I am seeing the same issue. I think we should add the etc_runtime_t label for now. And I can try to write a policy for that.
Karel, it works fine for me with chcon -t etc_runtime_t /etc/securetty And I am not seeing AVC msgs which Dan mentioned in the comment #4.
Created attachment 484502 [details] audit.log after console login I am testing on virtual (kvm/qemu) x86_64 host on x86_64 RHEL6 guest. Changing the context allowed me to login, I am adding the audit.log as the attachment.
Well if you are able to login with the securetty completing successfull, no other changes need to be made other then changing the label on /etc/securettys
The only concern with changing this label would be if other confined domains need to read it and can not. I think all login domains can read it, not sure what else would read it.
The 'chcon -t etc_runtime_t /etc/securetty' command suggested in the BZ resolved an AVC I was seeing and also allows the getty to start on the console of my RHEL6.1 mls test system.
Fixed in selinux-policy-3.7.19-79.el6
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0526.html