Bug 180054 - Pam fails to compile without libaudit installed
Pam fails to compile without libaudit installed
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: pam (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-05 00:58 EST by Vallimar
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-06 11:20:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch file from comments. (302 bytes, patch)
2006-02-05 01:01 EST, Vallimar
no flags Details | Diff

  None (edit)
Description Vallimar 2006-02-05 00:58:32 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060204 Firefox/1.5

Description of problem:
The new module "pam_tally2" is missing an #ifdef check for HAVE_LIBAUDIT.
This results in a failure to compile of this module, which causes
a failure in compilation in general when building a new binary rpm.

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

How reproducible:
Always

Steps to Reproduce:
1. Do not have libaudit installed.
2. Compile.
3. Wait.
  

Actual Results:  pam_tally.c: In function 'get_tally':
pam_tally.c:378: warning: comparison between signed and unsigned
pam_tally.c: In function 'tally_check':
pam_tally.c:533: error: 'audit_fd' undeclared (first use in this function)
pam_tally.c:533: error: (Each undeclared identifier is reported only once
pam_tally.c:533: error: for each function it appears in.)
make: *** [pam_tally.lo] Error 1

Expected Results:  Compiled successfully, albiet with minor pointer comparison warnings.

Additional info:

Simple fix:

--- modules/pam_tally2/pam_tally.c.fix       2006-02-05 00:43:46.000000000 -0500
+++ modules/pam_tally2/pam_tally.c   2006-02-05 00:43:14.000000000 -0500
@@ -530,9 +530,11 @@
     }
 
 cleanup:
+#ifdef HAVE_LIBAUDIT
     if (audit_fd != -1) {
         close(audit_fd);
     }
+#endif
     return rv;
 }
Comment 1 Vallimar 2006-02-05 01:01:54 EST
Created attachment 124193 [details]
Patch file from comments.
Comment 2 Tomas Mraz 2006-02-06 11:20:47 EST
Fixed in upstream CVS on elvis.redhat.com. Package will be fixed on next rebuild.

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