Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159974 - pam_loginuid fails horribly on non-audit kernels
Summary: pam_loginuid fails horribly on non-audit kernels
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pam
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-09 20:28 UTC by Bill Nottingham
Modified: 2014-03-17 02:54 UTC (History)
2 users (show)

Fixed In Version: pam-0.79-10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-06-09 21:36:30 UTC


Attachments (Terms of Use)

Description Bill Nottingham 2005-06-09 20:28:08 UTC
Noticed by Al Viro.

It tries to open /proc/<pid>/loginuid, which doesn't exist. It then errors out
-> you can't log in at all.

It should probably either check for the /proc/<pid>/loginuid file first (and
warn if it's not there), or it should check for the presence of a compatible
audit layer, and exit successfully if there isn't one.

Comment 1 Steve Grubb 2005-06-09 20:56:47 UTC
I'll adjust the loginuid patch to exit successfully if and only if errno ==
ENOENT on open. This will satisfy CAPP & let people with nonstandard kernels get
back into their system.

Comment 2 Tomas Mraz 2005-06-09 21:36:30 UTC
Here is the changed code snippet I patched in the latest rawhide:

        fd = open("/proc/self/loginuid", O_NOFOLLOW|O_WRONLY|O_TRUNC);
        if (fd < 0) {
                int loglevel = LOG_DEBUG;
                if (errno != ENOENT) {
                        rc = 1;
                        loglevel = LOG_ERR;
                }
                _pam_log(loglevel, "set_loginuid failed opening loginuid\n");
                return rc;
        }



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