Bug 789176 - /usr/include/security/pam_modutil.h needs unistd.h
Summary: /usr/include/security/pam_modutil.h needs unistd.h
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pam
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-10 02:05 UTC by Toshio Ernie Kuratomi
Modified: 2012-08-17 14:29 UTC (History)
1 user (show)

Fixed In Version: pam-1.1.6-1.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-17 14:29:28 UTC
Type: ---


Attachments (Terms of Use)

Description Toshio Ernie Kuratomi 2012-02-10 02:05:28 UTC
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 08:13:38 UTC
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.