Bug 535 - ./configure doesn't properly check for libpam
./configure doesn't properly check for libpam
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Configure
1.8.4
PC Linux
: low low
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-01 03:18 MST by Michael Reilly
Modified: 2012-02-21 06:04 MST (History)
0 users

See Also:


Attachments
Config.log (192.81 KB, text/plain)
2012-02-03 13:41 MST, Michael Reilly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Reilly 2012-02-01 03:18:48 MST
./configure doesn't properly check for libpam, if not installed will cause a linker error during compile.

Tested against 1.8.3p2 and the latest mercurial commit.

Really minor, and I doubt it will ever be a real problem. Keep up the good work. :)
Comment 1 Todd C. Miller 2012-02-02 14:26:28 MST
I've added to the pam tests in configure, it now tests both the pam headers and libraries.  If you update your mercurial checkout you can give it a try.
Comment 2 Michael Reilly 2012-02-02 16:29:50 MST
It still doesn't seem to work, but I think I know what's causing the issue... maybe.

I have /usr/include/pam.h which belongs to libnetpbm10-dev.  I think the configure script is thinking that's the pam file it needs to look for, rather than the ones installed in libpam0g-dev, which are in /usr/include/security

Hope this helps.
Comment 3 Todd C. Miller 2012-02-03 09:05:44 MST
That's not it.  configure tests for security/pam_appl.h not pam.h
Can you attach your config.log file?
Comment 4 Michael Reilly 2012-02-03 13:41:57 MST
Created attachment 329 [details]
Config.log

config.log as requested.

It seems that -lpam is appearing in $SUDOERS_LIBS 

if test ${with_pam-"no"} != "no"; then
    # We already link with -ldl (see LIBDL below) so no need for that here.
    SUDOERS_LIBS="${SUDOERS_LIBS} -lpam"

from here.  Line 2487 in configure.in
Comment 5 Todd C. Miller 2012-02-03 15:15:03 MST
That looks like a configure from before changeset d6bf3e3d0aae which has the changes I was talking about.  If you update your mercurial repo (hg pull -u) and re-run configure it should behave as expected.
Comment 6 Michael Reilly 2012-02-03 15:22:06 MST
hmm... I guess I'm just a moron. :)  Works now that I've updated it (correctly).

Thanks, I don't see anything wrong anymore.  Looks like this bug is closed.
Comment 7 Todd C. Miller 2012-02-21 06:04:59 MST
Fixed in sudo 1.8.4