Bug 789176 - /usr/include/security/pam_modutil.h needs unistd.h
/usr/include/security/pam_modutil.h needs unistd.h
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pam (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-09 21:05 EST by Toshio Ernie Kuratomi
Modified: 2012-08-17 10:29 EDT (History)
1 user (show)

See Also:
Fixed In Version: pam-1.1.6-1.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-17 10:29:28 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 Toshio Ernie Kuratomi 2012-02-09 21:05:28 EST
Description of problem:

Trying to build pam_yubico we discovered that pam_modutil.h uses uid_t and gid_t but doesn't include unisdt.h.  This causes builds to fail unless the file being compiled has included that for itself earlier.

Version-Release number of selected component (if applicable):
pam-1.1.5-5.fc16.src.rpm

Also occurs on Fedora 15 through Fedora 18

How reproducible:

Everytime

Steps to Reproduce:
1. Create test.c with the following code:

#include <security/pam_modutil.h>
int main () {
    return 0;
}

2. Attempt to compile it:

gcc test.c
  
Actual results:

In file included from test.c:1:0:
/usr/include/security/pam_modutil.h:60:42: error: unknown type name ‘uid_t’
/usr/include/security/pam_modutil.h:66:42: error: unknown type name ‘gid_t’
/usr/include/security/pam_modutil.h:79:35: error: unknown type name ‘gid_t’
/usr/include/security/pam_modutil.h:83:35: error: unknown type name ‘uid_t’
/usr/include/security/pam_modutil.h:88:35: error: unknown type name ‘uid_t’
/usr/include/security/pam_modutil.h:89:35: error: unknown type name ‘gid_t’
/usr/include/security/pam_modutil.h:105:2: error: unknown type name ‘gid_t’
/usr/include/security/pam_modutil.h:108:2: error: unknown type name ‘gid_t’
/usr/include/security/pam_modutil.h:109:2: error: unknown type name ‘uid_t’


Expected results:

test.c compiled to an a.out that does nothing.

Additional info:

This likely works on RHEL5 and 6 because those are using an older version of gcc or glibc where unistd.h was already pulled in.

pam_modutil.h just needs to have::

  #include <unistd.h>

like pam_client.h already has.
Comment 1 Tomas Mraz 2012-02-10 03:13:38 EST
I've fixed it upstream (actually different includes are needed though). As soon as upstream releases a new release I'll add it to Fedora.

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