Bug 1270224 - pam_console does not acquire console lock when logged in via gdm
Summary: pam_console does not acquire console lock when logged in via gdm
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pam
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-09 10:22 UTC by Ian Collier
Modified: 2016-04-28 12:05 UTC (History)
3 users (show)

Fixed In Version: Fedora 24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-28 12:05:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ian Collier 2015-10-09 10:22:20 UTC
Description of problem:

/var/run/console is empty when logged in via gdm.

Version-Release number of selected component (if applicable):
pam-1.1.8-18.fc22.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install Fedora 22 with gdm as login manager
2. Log in
3. ls /var/run/console

Actual results:
Directory is empty

Expected results:
Directory should contain console.lock and a counter named after my
username.

Additional info:
It appears that pam_console is being asked to match against "/dev/tty2"
but none of the strings in /etc/security/console.handlers matches the
/dev at the beginning.  I am guessing this is new behaviour of gdm
in GNOME 3.16 because it does seem to work properly in Fedora 21.

Comment 1 Tomas Mraz 2015-10-12 08:28:43 UTC
What is output of grep 'pam_console' -r /etc/pam.d ?

The /dev is removed by pam_console itself, so that shouldn't be the issue.

Comment 2 Ian Collier 2015-10-12 11:06:32 UTC
$ grep 'pam_console' -r /etc/pam.d
/etc/pam.d/gdm-password:session     optional      pam_console.so 
/etc/pam.d/login:session    optional     pam_console.so
/etc/pam.d/gdm-smartcard:session     optional      pam_console.so
/etc/pam.d/gdm-pin:session     optional      pam_console.so
/etc/pam.d/gdm-autologin:session    optional    pam_console.so
/etc/pam.d/xserver:auth       required  pam_console.so
/etc/pam.d/gdm-fingerprint:session     optional      pam_console.so


The kicker is that it starts working again if I put /dev/tty[0-9] into
/etc/security/console.handlers.

Comment 3 Tomas Mraz 2015-10-12 12:12:52 UTC
Ah, you're right, I was confused because I thought the text login command uses the full path with /dev/ and that pam_console removes it. But that is not the case. Anyway, I will modify the default console.handlers to allow for the /dev/ prefix.
Note that the pam_console will go away in the future completely.

Comment 4 Hans de Goede 2016-02-05 15:09:16 UTC
Hi Tomas,

I just spend half an hour debugging a problem with xawtv (v4l-conf) which is caused by this.

Changing the line in /etc/security/console.handlers from:

console consoledevs tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]+\.[0-9]+ :[0-9]+

to:

console consoledevs tty[0-9][0-9]* /dev/tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]+\.[0-9]+ :[0-9]+

Fixes this, it would be nice if you could create an update package with this fixed.

Thanks & Regards,

Hans


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