Bug 180054

Summary: Pam fails to compile without libaudit installed
Product: [Fedora] Fedora Reporter: Vallimar <vallimar>
Component: pamAssignee: Tomas Mraz <tmraz>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-06 16:20:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch file from comments. none

Description Vallimar 2006-02-05 05:58:32 UTC
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 06:01:54 UTC
Created attachment 124193 [details]
Patch file from comments.

Comment 2 Tomas Mraz 2006-02-06 16:20:47 UTC
Fixed in upstream CVS on elvis.redhat.com. Package will be fixed on next rebuild.