Bug 198623 - Make login processes inialise session keyring
Make login processes inialise session keyring
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pam (Show other bugs)
6
All Linux
high Severity medium
: ---
: ---
Assigned To: Tomas Mraz
: Reopened
Depends On: 198626 198628 198629 198630 198631 198632 198636 198637 198638 198639 198755 245578
Blocks: 198799
  Show dependency treegraph
 
Reported: 2006-07-12 09:05 EDT by David Howells
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-19 06:42:54 EDT
Type: ---
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 David Howells 2006-07-12 09:05:41 EDT
This is a blanket bug for tracking FC6 configuration alteration.

WHAT NEEDS TO BE DONE
=====================
The PAM scripts for the login programs need to be altered to forcibly create a 
new session keyring when a login event occurs.

These simply require the following line adding to their PAM scripts:

	session	    optional    pam_keyinit.so    force revoke

This forces them to create a new session keyring during login, replacing the
one inherited from their parent, and causes the session keyring so created to
be revoked when the login process exits.

Ideally, this should be "required" not "optional", but it still has to work if 
the pam_keyinit.so library is absent.

The authlogin program needs modifying to add:

	session	    optional    pam_keyinit.so    revoke

To the default session (system-auth).  This just creates a new session keyring 
if one doesn't yet exist for this process.

The "su" program needs to split its "su - [user]" mode PAM script from its "su 
[user]" PAM script, so that the former can forcibly create a keyring whilst 
the latter doesn't.
Comment 1 David Howells 2006-07-12 10:00:40 EDT
The keyring in question is the session keyring maintained by the kernel for 
each process and manageable through the keyutils package.
Comment 2 Harald Hoyer 2006-07-12 10:24:37 EDT
/usr/sbin/in.telnetd uses /bin/login
$ rpm -qf /bin/login
util-linux-2.13-0.20.3
Comment 3 David Howells 2006-07-13 08:58:10 EDT
| These simply require the following line adding to their PAM scripts:

Aargh! I forgot to mention: this needs to go *above* the other session lines, 
so that any key they add gets placed in the new keyring.
Comment 4 Tomas Mraz 2006-07-17 10:32:27 EDT
Added 'session optional pam_keyinit.so revoke' to the default
/etc/pam.d/system-auth in pam package. Leaving the bug report open for tracking.
Comment 5 Tomas Mraz 2006-07-19 06:42:54 EDT
All deps fixed, pam fixed, closing

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