I tried to compile pam_ldap-184 but it gave lots of error msgs. BTW, I have successfully compiled nss_ldap-255.
For pam_ldap, my configure looks like: ./configure --with-ldap-lib=openldap --with-ldap-dir=/usr/local --with-ldap-conf-file=/usr/local/etc/openldap/ldap.conf
and the following is the configure output --- start of configure output --- creating cache ./config.cache checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... missing checking for working autoconf... missing checking for working automake... missing checking for working autoheader... missing checking for working makeinfo... missing checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for a BSD compatible install... /usr/bin/install -c checking for security/pam_appl.h... no checking for security/pam_misc.h... no checking for security/pam_modules.h... no checking for pam/pam_appl.h... no checking for pam/pam_misc.h... no checking for pam/pam_modules.h... no checking for des.h... no checking for crypt.h... yes checking for lber.h... yes checking for ldap.h... yes checking for ldap_ssl.h... no checking for sasl/sasl.h... no checking for sasl.h... no checking for main in -ldl... yes checking for main in -lpam... no checking for main in -lresolv... yes checking for main in -lcrypt... yes checking for main in -lnsl... yes checking for gethostbyname... yes checking for main in -llber... yes checking for main in -lldap... yes checking for ldap_init... yes checking for ldap_get_lderrno... no checking for ldap_set_lderrno... no checking for ldap_parse_result... yes checking for ldap_memfree... yes checking for ldap_controls_free... yes checking for ldap_set_option... yes checking for ldap_get_option... yes checking for ldapssl_init... no checking for ldap_start_tls_s... yes checking for ldap_pvt_tls_set_option... yes checking for ldap_initialize... yes checking for ldap_sasl_bind... yes checking for ldap_sasl_interactive_bind_s... yes checking for gethostbyname_r... yes checking whether gethostbyname_r takes 6 arguments... 6 checking for ldap_set_rebind_proc... yes checking whether ldap_set_rebind_proc takes 3 arguments... 3 updating cache ./config.cache creating ./config.status creating Makefile creating config.h --- end of configure output ---
After running make, I got these error msgs below. I need help, please. TIA.
--- start of compile error msgs --- gcc -DHAVE_CONFIG_H -DLDAP_REFERRALS -DLDAP_DEPRECATED -D_REENTRANT -I/usr/local/include -g -O2 -Wall -fPIC -c pam_ldap.c In file included from pam_ldap.c:131: pam_ldap.h:35:34: security/pam_modules.h: No such file or directory In file included from pam_ldap.c:131: pam_ldap.h:329: error: syntax error before '*' token pam_ldap.h:330: error: syntax error before '*' token pam_ldap.h:334: error: syntax error before '*' token pam_ldap.h:335: error: syntax error before '*' token pam_ldap.h:339: error: syntax error before '*' token pam_ldap.h:343: error: syntax error before '*' token pam_ldap.c:203: error: syntax error before '*' token pam_ldap.c:205: error: syntax error before '*' token pam_ldap.c:206: error: syntax error before '*' token pam_ldap.c:247: error: syntax error before '*' token pam_ldap.c:261: error: syntax error before '*' token pam_ldap.c:266: error: syntax error before '*' token pam_ldap.c:272: error: syntax error before '*' token pam_ldap.c:274: error: syntax error before '*' token pam_ldap.c:279: error: syntax error before '*' token pam_ldap.c:281: warning: "struct pam_conv" declared inside parameter list pam_ldap.c:281: warning: its scope is only this definition or declaration, which is probably not what you want pam_ldap.c:566: error: syntax error before '*' token pam_ldap.c: In function `_pam_ldap_cleanup_session': pam_ldap.c:568: error: `data' undeclared (first use in this function) pam_ldap.c:568: error: (Each undeclared identifier is reported only once pam_ldap.c:568: error: for each function it appears in.) pam_ldap.c: At top level: pam_ldap.c:591: error: syntax error before '*' token pam_ldap.c: In function `_cleanup_data': pam_ldap.c:593: error: `data' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:600: error: syntax error before '*' token pam_ldap.c: In function `_cleanup_authtok_data': pam_ldap.c:602: error: `data' undeclared (first use in this function) pam_ldap.c: In function `_alloc_config': pam_ldap.c:617: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:666: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_read_config': pam_ldap.c:771: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:773: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:800: error: `PAM_SERVICE_ERR' undeclared (first use in this function) pam_ldap.c: In function `_open_session': pam_ldap.c:1261: error: `PAM_SERVICE_ERR' undeclared (first use in this function) pam_ldap.c:1383: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:1388: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_connect_anonymously': pam_ldap.c:1530: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:1557: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:1587: error: `PAM_CRED_INSUFFICIENT' undeclared (first use in this function) pam_ldap.c: In function `_rebind_proc': pam_ldap.c:1643: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:1899: error: syntax error before '*' token pam_ldap.c: In function `_connect_as_user': pam_ldap.c:1914: error: `password' undeclared (first use in this function) pam_ldap.c:1915: error: `PAM_AUTH_ERR' undeclared (first use in this function) pam_ldap.c:1918: error: `session' undeclared (first use in this function) pam_ldap.c:1919: error: `PAM_SYSTEM_ERR' undeclared (first use in this function) pam_ldap.c:1923: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:1957: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:2032: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:2108: error: `PAM_SERVICE_ERR' undeclared (first use in this function) pam_ldap.c: In function `_get_integer_value': pam_ldap.c:2218: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:2223: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_get_long_integer_value': pam_ldap.c:2235: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:2240: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_get_string_value': pam_ldap.c:2281: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:2286: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:2290: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_get_string_values': pam_ldap.c:2306: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:2310: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:2347: error: syntax error before '*' token pam_ldap.c: In function `_service_ok': pam_ldap.c:2353: error: `session' undeclared (first use in this function) pam_ldap.c:2355: error: `PAM_PERM_DENIED' undeclared (first use in this function) pam_ldap.c:2358: warning: implicit declaration of function `pam_get_item' pam_ldap.c:2358: error: `pamh' undeclared (first use in this function) pam_ldap.c:2358: error: `PAM_SERVICE' undeclared (first use in this function) pam_ldap.c:2358: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:2359: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_host_ok': pam_ldap.c:2396: error: `PAM_PERM_DENIED' undeclared (first use in this function) pam_ldap.c:2402: error: `PAM_SYSTEM_ERR' undeclared (first use in this function) pam_ldap.c:2440: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_escape_string': pam_ldap.c:2521: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:2557: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_get_user_info': pam_ldap.c:2572: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:2627: error: `PAM_USER_UNKNOWN' undeclared (first use in this function) pam_ldap.c:2652: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:2668: error: `PAM_SERVICE_ERR' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:2739: error: syntax error before '*' token pam_ldap.c: In function `_pam_ldap_get_session': pam_ldap.c:2746: warning: implicit declaration of function `pam_get_data' pam_ldap.c:2746: error: `pamh' undeclared (first use in this function) pam_ldap.c:2746: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:2746: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:2756: error: `username' undeclared (first use in this function) pam_ldap.c:2761: error: `configFile' undeclared (first use in this function) pam_ldap.c:2777: error: `psession' undeclared (first use in this function) pam_ldap.c:2792: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:2817: warning: implicit declaration of function `pam_set_data' pam_ldap.c: In function `_session_reopen': pam_ldap.c:2848: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: In function `_get_password_policy': pam_ldap.c:2855: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:2904: error: syntax error before '*' token pam_ldap.c: In function `_do_authentication': pam_ldap.c:2908: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:2910: error: `session' undeclared (first use in this function) pam_ldap.c:2912: error: `user' undeclared (first use in this function) pam_ldap.c:2921: error: `pamh' undeclared (first use in this function) pam_ldap.c:2921: error: `password' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:2928: error: syntax error before '*' token pam_ldap.c: In function `_update_authtok': pam_ldap.c:2938: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:2958: error: `session' undeclared (first use in this function) pam_ldap.c:2960: error: `user' undeclared (first use in this function) pam_ldap.c:2981: error: `pamh' undeclared (first use in this function) pam_ldap.c:2981: error: `old_password' undeclared (first use in this function) pam_ldap.c:2989: error: `new_password' undeclared (first use in this function) pam_ldap.c:3126: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_ldap.c:3157: error: `PAM_PERM_DENIED' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:3208: error: syntax error before '*' token pam_ldap.c: In function `_get_authtok': pam_ldap.c:3212: error: storage size of 'msg' isn't known pam_ldap.c:3217: error: `PAM_PROMPT_ECHO_OFF' undeclared (first use in this function) pam_ldap.c:3218: error: `first' undeclared (first use in this function) pam_ldap.c:3221: error: `pamh' undeclared (first use in this function) pam_ldap.c:3221: error: `PAM_CONV' undeclared (first use in this function) pam_ldap.c:3221: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3222: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:3224: error: dereferencing pointer to incomplete type pam_ldap.c:3226: error: dereferencing pointer to incomplete type pam_ldap.c:3235: error: `flags' undeclared (first use in this function) pam_ldap.c:3235: error: `PAM_DISALLOW_NULL_AUTHTOK' undeclared (first use in this function) pam_ldap.c:3235: error: invalid use of undefined type `struct pam_response' pam_ldap.c:3235: error: dereferencing pointer to incomplete type pam_ldap.c:3238: error: `PAM_AUTH_ERR' undeclared (first use in this function) pam_ldap.c:3241: error: invalid use of undefined type `struct pam_response' pam_ldap.c:3241: error: dereferencing pointer to incomplete type pam_ldap.c:3243: error: invalid use of undefined type `struct pam_response' pam_ldap.c:3243: error: dereferencing pointer to incomplete type pam_ldap.c:3247: error: `PAM_CONV_ERR' undeclared (first use in this function) pam_ldap.c:3251: warning: implicit declaration of function `pam_set_item' pam_ldap.c:3251: error: `PAM_AUTHTOK' undeclared (first use in this function) pam_ldap.c:3212: warning: unused variable `msg' pam_ldap.c: At top level: pam_ldap.c:3258: warning: "struct pam_conv" declared inside parameter list pam_ldap.c:3259: error: conflicting types for '_conv_sendmsg' pam_ldap.c:281: error: previous declaration of '_conv_sendmsg' was here pam_ldap.c:3259: error: conflicting types for '_conv_sendmsg' pam_ldap.c:281: error: previous declaration of '_conv_sendmsg' was here pam_ldap.c: In function `_conv_sendmsg': pam_ldap.c:3260: error: storage size of 'msg' isn't known pam_ldap.c:3264: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:3272: error: dereferencing pointer to incomplete type pam_ldap.c:3274: error: dereferencing pointer to incomplete type pam_ldap.c:3260: warning: unused variable `msg' pam_ldap.c: At top level: pam_ldap.c:3278: error: syntax error before '*' token pam_ldap.c: In function `pam_sm_authenticate': pam_ldap.c:3289: error: `argc' undeclared (first use in this function) pam_ldap.c:3291: error: `argv' undeclared (first use in this function) pam_ldap.c:3309: warning: implicit declaration of function `pam_get_user' pam_ldap.c:3309: error: `pamh' undeclared (first use in this function) pam_ldap.c:3310: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:3317: error: `PAM_AUTHTOK' undeclared (first use in this function) pam_ldap.c:3317: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3323: error: `PAM_USER_UNKNOWN' undeclared (first use in this function) pam_ldap.c:3323: error: `PAM_IGNORE' undeclared (first use in this function) pam_ldap.c:3323: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:3333: error: `PAM_USER' undeclared (first use in this function) pam_ldap.c:3341: error: `flags' undeclared (first use in this function) pam_ldap.c:3345: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c: At top level: pam_ldap.c:3371: error: syntax error before '*' token pam_ldap.c: In function `pam_sm_setcred': pam_ldap.c:3373: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:3377: error: syntax error before '*' token pam_ldap.c: In function `pam_sm_open_session': pam_ldap.c:3387: error: `pamh' undeclared (first use in this function) pam_ldap.c:3387: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:3394: error: syntax error before '*' token pam_ldap.c: In function `pam_sm_close_session': pam_ldap.c:3397: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c: At top level: pam_ldap.c:3401: error: syntax error before '*' token pam_ldap.c: In function `pam_sm_chauthtok': pam_ldap.c:3403: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:3407: error: storage size of 'msg' isn't known pam_ldap.c:3419: error: `argc' undeclared (first use in this function) pam_ldap.c:3421: error: `argv' undeclared (first use in this function) pam_ldap.c:3441: error: `flags' undeclared (first use in this function) pam_ldap.c:3441: error: `PAM_SILENT' undeclared (first use in this function) pam_ldap.c:3444: error: `pamh' undeclared (first use in this function) pam_ldap.c:3444: error: `PAM_CONV' undeclared (first use in this function) pam_ldap.c:3444: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3453: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3462: error: `PAM_USER_UNKNOWN' undeclared (first use in this function) pam_ldap.c:3464: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3476: error: `PAM_IGNORE' undeclared (first use in this function) pam_ldap.c:3476: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:3482: error: `PAM_ERROR_MSG' undeclared (first use in this function) pam_ldap.c:3482: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3483: error: `PAM_PERM_DENIED' undeclared (first use in this function) pam_ldap.c:3486: error: `PAM_PRELIM_CHECK' undeclared (first use in this function) pam_ldap.c:3500: error: `PAM_OLDAUTHTOK' undeclared (first use in this function) pam_ldap.c:3501: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3510: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3516: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3537: error: `PAM_PROMPT_ECHO_OFF' undeclared (first use in this function) pam_ldap.c:3541: error: dereferencing pointer to incomplete type pam_ldap.c:3542: error: dereferencing pointer to incomplete type pam_ldap.c:3547: error: dereferencing pointer to incomplete type pam_ldap.c:3565: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3569: error: `PAM_AUTHTOK_RECOVER_ERR' undeclared (first use in this function) pam_ldap.c:3576: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3582: error: `PAM_MAXTRIES' undeclared (first use in this function) pam_ldap.c:3606: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3611: warning: implicit declaration of function `pam_strerror' pam_ldap.c:3611: warning: format argument is not a pointer (arg 3) pam_ldap.c:3621: error: `PAM_AUTHTOK' undeclared (first use in this function) pam_ldap.c:3621: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3647: error: dereferencing pointer to incomplete type pam_ldap.c:3648: error: dereferencing pointer to incomplete type pam_ldap.c:3653: error: dereferencing pointer to incomplete type pam_ldap.c:3697: error: dereferencing pointer to incomplete type pam_ldap.c:3698: error: dereferencing pointer to incomplete type pam_ldap.c:3702: error: dereferencing pointer to incomplete type pam_ldap.c:3715: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3730: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3736: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3761: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3782: error: `PAM_TEXT_INFO' undeclared (first use in this function) pam_ldap.c:3783: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3407: warning: unused variable `msg' pam_ldap.c: At top level: pam_ldap.c:3793: error: syntax error before '*' token pam_ldap.c: In function `pam_sm_acct_mgmt': pam_ldap.c:3806: error: `PAM_SUCCESS' undeclared (first use in this function) pam_ldap.c:3815: error: `argc' undeclared (first use in this function) pam_ldap.c:3817: error: `argv' undeclared (first use in this function) pam_ldap.c:3835: error: `flags' undeclared (first use in this function) pam_ldap.c:3835: error: `PAM_SILENT' undeclared (first use in this function) pam_ldap.c:3838: error: `pamh' undeclared (first use in this function) pam_ldap.c:3838: error: `PAM_CONV' undeclared (first use in this function) pam_ldap.c:3838: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3847: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_ldap.c:3856: error: `PAM_USER_UNKNOWN' undeclared (first use in this function) pam_ldap.c:3869: error: `PAM_IGNORE' undeclared (first use in this function) pam_ldap.c:3869: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_ldap.c:3885: error: `PAM_ACCT_EXPIRED' undeclared (first use in this function) pam_ldap.c:3934: error: `PAM_ERROR_MSG' undeclared (first use in this function) pam_ldap.c:3934: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3938: error: `PAM_NEW_AUTHTOK_REQD' undeclared (first use in this function) pam_ldap.c:3950: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3951: error: `PAM_PERM_DENIED' undeclared (first use in this function) pam_ldap.c:3957: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:3997: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:4015: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:4027: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:4037: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:4047: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c:4056: warning: passing arg 1 of `_conv_sendmsg' from incompatible pointer type pam_ldap.c: At top level: pam_ldap.c:281: warning: '_conv_sendmsg' declared `static' but never defined make: *** [pam_ldap.o] Error 1
--- end of compile error msgs ---
-- bubuk