Bug 1270224 - pam_console does not acquire console lock when logged in via gdm
pam_console does not acquire console lock when logged in via gdm
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: pam (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-09 06:22 EDT by Ian Collier
Modified: 2016-04-28 08:05 EDT (History)
3 users (show)

See Also:
Fixed In Version: Fedora 24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-28 08:05:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Collier 2015-10-09 06:22:20 EDT
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 04:28:43 EDT
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 07:06:32 EDT
$ 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 08:12:52 EDT
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 10:09:16 EST
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.