Bug 460263 - pam_loginuid fails on 32 bit uid's
pam_loginuid fails on 32 bit uid's
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: pam (Show other bugs)
All Linux
medium Severity high
: rc
: ---
Assigned To: Tomas Mraz
Depends On:
  Show dependency treegraph
Reported: 2008-08-27 03:52 EDT by Tomas Mraz
Modified: 2009-01-20 17:04 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 17:04:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tomas Mraz 2008-08-27 03:52:37 EDT
+++ This bug was initially created as a clone of Bug #460241 +++

Description of problem:

The pam_loginuid session module fails if the high bit in the UID is set.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a user with a large UID.   IE:

   biguser:x:4294967294:10001:Big User:/home/biguser:/bin/bash

2. Insure that:
   session    required     pam_loginuid.so
is in /etc/pam.d/login

3. Log into the machine as "biguser".     

Actual results:
You'll see the message:

pam_open_session failed: Cannot make/remove an entry for the specified session

and the session will be closed.

Expected results:
Login successfully.

Additional info:
Works fine if you change the UID to a 31 bit number: 2147483646

--- Additional comment from tmraz@redhat.com on 2008-08-27 03:45:20 EDT ---

There is a wrong format in snprintf() in pam_loginuid causing it to write negative numbers in such case which are not accepted by kernel.
Comment 2 RHEL Product and Program Management 2008-08-27 04:02:44 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 7 errata-xmlrpc 2009-01-20 17:04:22 EST
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.


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