Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 704442 - allow root login on devices from /sys/class/tty/console/active
Summary: allow root login on devices from /sys/class/tty/console/active
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pam
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL: https://fedorahosted.org/linux-pam/ti...
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2011-05-13 07:29 UTC by Dan Horák
Modified: 2011-08-30 20:45 UTC (History)
3 users (show)

Fixed In Version: pam-1.1.4-1.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-30 20:45:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
allow root login on devices from /sys/class/tty/console/active (2.27 KB, application/octet-stream)
2011-05-13 07:29 UTC, Dan Horák
no flags Details

Description Dan Horák 2011-05-13 07:29:50 UTC
Created attachment 498708 [details]
allow root login on devices from /sys/class/tty/console/active

root should be allowed to login on devices from "/sys/class/tty/console/active". On s390x the kernel presents various consoles (z/VM console, HMC console for LPARs) as /dev/ttyS? and with the recent switch from upstart to systemd the init process doesn't call /sbin/securetty to add the serial line device to /etc/securetty when getty is started.

The /sys/class/tty/console/active file was added in this commit - 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fbc92a3455577ab17615cbcb91826399061bd789

From a discussion with Lennart on #systemd:
<sharkcz> we have a problem in F-15 on system with main console on ttyS0 where root can't log in because ttyS0 is not /etc/securetty, upstart (or better upstart job in initscripts) took care of that earlier
<mezcalero> sharkcz: pam_securetty has been updated to check console= from the kernel cmdline
<mezcalero> and allow that too
<sharkcz> ah, but on s390x the console= is not used and the kernel uses ttyS0 by default
<mezcalero> sharkcz: hmm, i guess we should update pam_securetty to check /sys/class/tty/console/active instead of the cmdline
<mezcalero> that should work for you, too, then, right?
<sharkcz> mezcalero: yep, looks like it has the correct value
<mezcalero> sharkcz: it's actually a list of values
<mezcalero> sharkcz: because you can pass console= multiple times on the kernel cmdline
<mezcalero> sharkcz: anyway, such a fix should be simple to do
<mezcalero> sharkcz: for compat with older kernels the current cmdline check probably should stay in pam_securetty
<mezcalero> but the new check used if /sys/class/tty/console/active can be opened


Note You need to log in before you can comment on or make changes to this bug.