IBM AIX 7.1 install pam_radius-1.3.17 error
Hello every one, I try install pam_radius-1.3.17 into IBM AIX 7.1 server. I install Linux tool first. When I make, have error: # make cc -Wall -fPIC -c pam_radius_auth.c -o pam_radius_auth.o pam_radius_auth.c: In function 'talk_radius': pam_radius_auth.c:886:10: warning: passing argument 6 of 'nrecvfrom' from incompatible pointer type [enabled by default] 0, &saremote, &salen)) < 0) { ^ In file included from pam_radius_auth.h:8:0, from pam_radius_auth.c:65: /usr/include/sys/socket.h:552:9: note: expected 'socklen_t *' but argument is of type 'int *' ssize_t recvfrom(int, void *__restrict__, size_t, int, struct sockaddr *__restrict__, socklen_t *__restrict__); ^ pam_radius_auth.c: In function 'rad_converse': pam_radius_auth.c:1027:3: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_CONV, (CONST void **) &conv); ^ In file included from /usr/include/security/pam_modules.h:28:0, from pam_radius_auth.c:63: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ pam_radius_auth.c:1030:3: warning: passing argument 2 of 'conv->conv' from incompatible pointer type [enabled by default] retval = conv->conv(1, msg, &resp,conv->appdata_ptr); ^ pam_radius_auth.c:1030:3: note: expected 'struct pam_message **' but argument is of type 'const struct pam_message **' pam_radius_auth.c: At top level: pam_radius_auth.c:1061:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int ^ pam_radius_auth.c:1268:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int ^ pam_radius_auth.c: In function 'pam_private_session': pam_radius_auth.c:1300:3: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type [enabled by default] retval = pam_get_user(pamh, &user, NULL); ^ In file included from /usr/include/security/pam_modules.h:28:0, from pam_radius_auth.c:63: /usr/include/security/pam_appl.h:219:1: note: expected 'char **' but argument is of type 'const char **' pam_get_user( ^ pam_radius_auth.c:1321:5: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_SERVICE, (CONST void **) &config.client_id); ^ In file included from /usr/include/security/pam_modules.h:28:0, from pam_radius_auth.c:63: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ pam_radius_auth.c:1288:7: warning: variable 'ctrl' set but not used [-Wunused-but-set-variable] int ctrl; ^ pam_radius_auth.c: At top level: pam_radius_auth.c:1369:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int ^ pam_radius_auth.c:1376:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int ^ pam_radius_auth.c:1387:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int ^ pam_radius_auth.c:1616:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int ^ pam_radius_auth.c:1014:12: warning: 'rad_converse' defined but not used [-Wunused-function] static int rad_converse(pam_handle_t *pamh, int msg_style, char *message, char **password) ^ pam_radius_auth.c:1283:1: warning: 'pam_private_session' defined but not used [-Wunused-function] pam_private_session(pam_handle_t *pamh, int flags, ^ make: 1254-004 The error code from the last command is 1. Stop. -- Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ==============================================================
On 14 May 2014, at 04:48, Sam 林立山 <sam@acom-networks.com> wrote:
Hello every one,
I try install pam_radius-1.3.17 into IBM AIX 7.1 server.
Try the code from the git repo first https://github.com/FreeRADIUS/pam_radius If that doesn't work, provide extracts from the man pages for the functions it's complaining about, and we can try and fix it. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Hello Arran, Thanks for your reply, I download pam_radius-master. ./configure and make, still not work. looks like same problem. # make cc -Wall -fPIC -c src/pam_radius_auth.c -o pam_radius_auth.o src/pam_radius_auth.c: In function 'rad_converse': src/pam_radius_auth.c:1004:2: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_CONV, (CONST void **) &conv); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1007:2: warning: passing argument 2 of 'conv->conv' from incompatible pointer type [enabled by default] retval = conv->conv(1, msg, &resp,conv->appdata_ptr); ^ src/pam_radius_auth.c:1007:2: note: expected 'struct pam_message **' but argument is of type 'const struct pam_message **' src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1037:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c:1240:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c: In function 'pam_private_session': src/pam_radius_auth.c:1268:2: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type [enabled by default] retval = pam_get_user(pamh, &user, NULL); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:219:1: note: expected 'char **' but argument is of type 'const char **' pam_get_user( ^ src/pam_radius_auth.c:1288:3: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_SERVICE, (CONST void **) &config.client_id); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1256:6: warning: variable 'ctrl' set but not used [-Wunused-but-set-variable] int ctrl; ^ src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1335:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ src/pam_radius_auth.c:1340:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ src/pam_radius_auth.c:1349:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ src/pam_radius_auth.c:1575:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c:991:12: warning: 'rad_converse' defined but not used [-Wunused-function] static int rad_converse(pam_handle_t *pamh, int msg_style, char *message, char **password) ^ src/pam_radius_auth.c:1253:12: warning: 'pam_private_session' defined but not used [-Wunused-function] static int pam_private_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv, int status) ^ make: 1254-004 The error code from the last command is 1. Stop. 於 2014/5/14 下午2:06, Arran Cudbard-Bell 提到:
On 14 May 2014, at 04:48, Sam 林立山 <sam@acom-networks.com> wrote:
Hello every one,
I try install pam_radius-1.3.17 into IBM AIX 7.1 server. Try the code from the git repo first
https://github.com/FreeRADIUS/pam_radius
If that doesn't work, provide extracts from the man pages for the functions it's complaining about, and we can try and fix it.
-Arran
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hello Arran, I don't understand your step2. What's your mean man page? There is only error message on the screen. bash-4.2# make cc -Wall -fPIC -c src/pam_radius_auth.c -o pam_radius_auth.o src/pam_radius_auth.c: In function 'rad_converse': src/pam_radius_auth.c:1004:2: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_CONV, (CONST void **) &conv); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1007:2: warning: passing argument 2 of 'conv->conv' from incompatible pointer type [enabled by default] retval = conv->conv(1, msg, &resp,conv->appdata_ptr); ^ src/pam_radius_auth.c:1007:2: note: expected 'struct pam_message **' but argument is of type 'const struct pam_message **' src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1037:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c:1240:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c: In function 'pam_private_session': src/pam_radius_auth.c:1268:2: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type [enabled by default] retval = pam_get_user(pamh, &user, NULL); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:219:1: note: expected 'char **' but argument is of type 'const char **' pam_get_user( ^ src/pam_radius_auth.c:1288:3: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_SERVICE, (CONST void **) &config.client_id); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1256:6: warning: variable 'ctrl' set but not used [-Wunused-but-set-variable] int ctrl; ^ src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1335:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ src/pam_radius_auth.c:1340:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ src/pam_radius_auth.c:1349:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ src/pam_radius_auth.c:1575:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c:991:12: warning: 'rad_converse' defined but not used [-Wunused-function] static int rad_converse(pam_handle_t *pamh, int msg_style, char *message, char **password) ^ src/pam_radius_auth.c:1253:12: warning: 'pam_private_session' defined but not used [-Wunused-function] static int pam_private_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv, int status) ^ make: 1254-004 The error code from the last command is 1. Stop. Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ============================================================== 於 2014/5/14 下午4:24, Arran Cudbard-Bell 提到:
On 14 May 2014, at 07:42, Sam 林立山 <sam@acom-networks.com> wrote:
Hello Arran,
Thanks for your reply, I download pam_radius-master. ./configure and make, still not work. looks like same problem. Ok. In the last email I detailed two steps.
Go to the second step.
-Arran
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Thu, May 15, 2014 at 9:56 AM, Sam 林立山 <sam@acom-networks.com> wrote:
Hello Arran,
I don't understand your step2. What's your mean man page? There is only error message on the screen.
Probably something like this
src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1037:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c:1240:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc,CONST char **argv)
Note the errors (assuming those are from latest git master)? Now run "man pam_sm_authenticate" and "man pam_sm_setcred". The documentation for those functions in AIX are probably available in the man page. FWIW, google search for "aix pam_sm_authenticate" returns this: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i... Also, have you tried using gcc? It might produce different result. -- Fajar
Hello Fajar, I already install gcc and ln -s /usr/bin/gcc /usr/bin/cc(if I didn't link cc to gcc, make will not work). All I find out man page list: man pam_get_item http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i... pam_get_user http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i... pam_sm_acct_mgmt http://publib.boulder.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm... man pam_sm_authenticate http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i... pam_sm_chauthtok http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i... pam_sm_close_session http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm... pam_sm_open_session http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i... pam_sm_setcred http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm... Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ============================================================== 於 2014/5/15 下午12:52, Fajar A. Nugraha 提到:
On Thu, May 15, 2014 at 9:56 AM, Sam 林立山 <sam@acom-networks.com <mailto:sam@acom-networks.com>> wrote:
Hello Arran,
I don't understand your step2. What's your mean man page? There is only error message on the screen.
Probably something like this
src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1037:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ src/pam_radius_auth.c:1240:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc,CONST char **argv)
Note the errors (assuming those are from latest git master)? Now run
"man pam_sm_authenticate" and "man pam_sm_setcred". The documentation for those functions in AIX are probably available in the man page.
FWIW, google search for "aix pam_sm_authenticate" returns this: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i...
Also, have you tried using gcc? It might produce different result.
-- Fajar
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Thu, May 15, 2014 at 1:03 PM, Sam 林立山 <sam@acom-networks.com> wrote:
Hello Fajar,
I already install gcc and ln -s /usr/bin/gcc /usr/bin/cc(if I didn't link cc to gcc, make will not work).
running "export CC=gcc" before ./configure should work without the need to create symlink. So to confirm, the error messages you posted earlier come from gcc?
All I find out man page list:
man pam_get_item
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i...
Hopefully it's useful for Arran. -- Fajar
Hello Fajar, Yes, all error come from gcc and thank you for export command. Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ============================================================== 2014-05-15 17:30 GMT+08:00 Fajar A. Nugraha <list@fajar.net>:
On Thu, May 15, 2014 at 1:03 PM, Sam 林立山 <sam@acom-networks.com> wrote:
Hello Fajar,
I already install gcc and ln -s /usr/bin/gcc /usr/bin/cc(if I didn't link cc to gcc, make will not work).
running "export CC=gcc" before ./configure should work without the need to create symlink.
So to confirm, the error messages you posted earlier come from gcc?
All I find out man page list:
man pam_get_item
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.i...
Hopefully it's useful for Arran.
-- Fajar
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 15 May 2014, at 10:52, Sam Lin <sam@acom-networks.com> wrote:
Hello Fajar,
Yes, all error come from gcc and thank you for export command.
Ok. Git pull and try again. I might have been something simple like PAM_EXTERN not being defined. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Hello Arran, Thank for your support. I try today and have error: bash-4.2# make cc -Wall -fPIC -c src/pam_radius_auth.c -o pam_radius_auth.o src/pam_radius_auth.c: In function 'rad_converse': src/pam_radius_auth.c:1004:2: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1007:2: warning: passing argument 2 of 'conv->conv' from incompatible pointer type [enabled by default] retval = conv->conv(1, msg, &resp,conv->appdata_ptr); ^ src/pam_radius_auth.c:1007:2: note: expected 'struct pam_message **' but argument is of type 'const struct pam_message **' src/pam_radius_auth.c: In function 'pam_sm_authenticate': src/pam_radius_auth.c:1056:2: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type [enabled by default] retval = pam_get_user(pamh, &user, NULL); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:219:1: note: expected 'char **' but argument is of type 'const char **' pam_get_user( ^ src/pam_radius_auth.c:1071:3: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_RUSER, (const void **) &userinfo); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1095:3: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_SERVICE, (const void **) &config.client_id); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1109:2: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **) &password); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1142:2: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_RHOST, (const void **) &rhost); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c: In function 'pam_sm_setcred': src/pam_radius_auth.c:1246:2: warning: passing argument 3 of 'pam_get_data' from incompatible pointer type [enabled by default] pam_get_data(pamh, "rad_setcred_return", (const void **) &pret); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:243:1: note: expected 'void **' but argument is of type 'const void **' pam_get_data( ^ src/pam_radius_auth.c: In function 'pam_private_session': src/pam_radius_auth.c:1268:2: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type [enabled by default] retval = pam_get_user(pamh, &user, NULL); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:219:1: note: expected 'char **' but argument is of type 'const char **' pam_get_user( ^ src/pam_radius_auth.c:1288:3: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_SERVICE, (const void **) &config.client_id); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1256:6: warning: variable 'ctrl' set but not used [-Wunused-but-set-variable] int ctrl; ^ src/pam_radius_auth.c: In function 'pam_sm_chauthtok': src/pam_radius_auth.c:1368:2: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type [enabled by default] retval = pam_get_user(pamh, &user, NULL); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:219:1: note: expected 'char **' but argument is of type 'const char **' pam_get_user( ^ src/pam_radius_auth.c:1388:3: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_SERVICE, (const void **) &config.client_id); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1397:2: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_OLDAUTHTOK, (const void **) &password); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ src/pam_radius_auth.c:1402:2: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type [enabled by default] retval = pam_get_item(pamh, PAM_AUTHTOK, (const void **) &new_password); ^ In file included from src/pam_radius_auth.h:25:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_appl.h:193:1: note: expected 'void **' but argument is of type 'const void **' pam_get_item( ^ cc -Wall -fPIC -c src/md5.c -o md5.o cc -shared -Wl pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so cc: error: unrecognized command line option '-Wl' make: 1254-004 The error code from the last command is 1. Stop. Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ============================================================== 於 2014/5/17 下午4:42, Arran Cudbard-Bell 提到:
On 15 May 2014, at 10:52, Sam Lin <sam@acom-networks.com> wrote:
Hello Fajar,
Yes, all error come from gcc and thank you for export command. Ok. Git pull and try again. I might have been something simple like PAM_EXTERN not being defined.
-Arran
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
cc -Wall -fPIC -c src/md5.c -o md5.o cc -shared -Wl pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so cc: error: unrecognized command line option '-Wl' make: 1254-004 The error code from the last command is 1.
Ok, tweaked it some more, try now? Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Hello Arran, Thank you very so much for your support, there still have error message: bash-4.2# make cc -Wall -fPIC -c src/pam_radius_auth.c -o pam_radius_auth.o src/pam_radius_auth.c:1037:16: error: conflicting types for 'pam_sm_authenticate' PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:36:1: note: previous declaration of 'pam_sm_authenticate' was here pam_sm_authenticate( ^ src/pam_radius_auth.c:1240:16: error: conflicting types for 'pam_sm_setcred' PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:43:1: note: previous declaration of 'pam_sm_setcred' was here pam_sm_setcred( ^ src/pam_radius_auth.c: In function 'pam_private_session': src/pam_radius_auth.c:1256:6: warning: variable 'ctrl' set but not used [-Wunused-but-set-variable] int ctrl; ^ src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1335:16: error: conflicting types for 'pam_sm_open_session' PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:57:1: note: previous declaration of 'pam_sm_open_session' was here pam_sm_open_session( ^ src/pam_radius_auth.c:1340:16: error: conflicting types for 'pam_sm_close_session' PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:64:1: note: previous declaration of 'pam_sm_close_session' was here pam_sm_close_session( ^ src/pam_radius_auth.c:1349:16: error: conflicting types for 'pam_sm_chauthtok' PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:88:1: note: previous declaration of 'pam_sm_chauthtok' was here pam_sm_chauthtok( ^ src/pam_radius_auth.c:1575:16: error: conflicting types for 'pam_sm_acct_mgmt' PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:50:1: note: previous declaration of 'pam_sm_acct_mgmt' was here pam_sm_acct_mgmt( ^ make: 1254-004 The error code from the last command is 1. Stop. Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ============================================================== 於 2014/5/25 下午5:50, Arran Cudbard-Bell 提到:
cc -Wall -fPIC -c src/md5.c -o md5.o cc -shared -Wl pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so cc: error: unrecognized command line option '-Wl' make: 1254-004 The error code from the last command is 1.
Ok, tweaked it some more, try now?
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thank you very so much for your support, there still have error message:
Can you send me the output of cat /usr/include/security/pam_modules.h For some reason the pam function signatures still don't match what you have on your system. -Arran
bash-4.2# make cc -Wall -fPIC -c src/pam_radius_auth.c -o pam_radius_auth.o src/pam_radius_auth.c:1037:16: error: conflicting types for 'pam_sm_authenticate' PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:36:1: note: previous declaration of 'pam_sm_authenticate' was here pam_sm_authenticate( ^ src/pam_radius_auth.c:1240:16: error: conflicting types for 'pam_sm_setcred' PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:43:1: note: previous declaration of 'pam_sm_setcred' was here pam_sm_setcred( ^ src/pam_radius_auth.c: In function 'pam_private_session': src/pam_radius_auth.c:1256:6: warning: variable 'ctrl' set but not used [-Wunused-but-set-variable] int ctrl; ^ src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1335:16: error: conflicting types for 'pam_sm_open_session' PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:57:1: note: previous declaration of 'pam_sm_open_session' was here pam_sm_open_session( ^ src/pam_radius_auth.c:1340:16: error: conflicting types for 'pam_sm_close_session' PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:64:1: note: previous declaration of 'pam_sm_close_session' was here pam_sm_close_session( ^ src/pam_radius_auth.c:1349:16: error: conflicting types for 'pam_sm_chauthtok' PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:88:1: note: previous declaration of 'pam_sm_chauthtok' was here pam_sm_chauthtok( ^ src/pam_radius_auth.c:1575:16: error: conflicting types for 'pam_sm_acct_mgmt' PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:50:1: note: previous declaration of 'pam_sm_acct_mgmt' was here pam_sm_acct_mgmt( ^ make: 1254-004 The error code from the last command is 1.
Stop. Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com
OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ==============================================================
於 2014/5/25 下午5:50, Arran Cudbard-Bell 提到:
cc -Wall -fPIC -c src/md5.c -o md5.o cc -shared -Wl pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so cc: error: unrecognized command line option '-Wl' make: 1254-004 The error code from the last command is 1.
Ok, tweaked it some more, try now?
Arran Cudbard-Bell <a.cudbardb@freeradius.org>
FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
On 26 May 2014, at 14:08, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
Thank you very so much for your support, there still have error message:
Can you send me the output of
cat /usr/include/security/pam_modules.h
For some reason the pam function signatures still don't match what you have on your system.
Oh, hm, I see the problem. For some reason the sm_* functions are const'd whereas the pam_get_item function isn't. This is insane. How does anyone write cross platform PAM modules?! Seems like for every API function you want to use you'd have to write an autoconf test, to try three or four different variants to actually get the module to build cleanly. I guess we'll have to do that then... but I don't have time currently. Maybe in a few days. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Hello Arran, The file pam_modules.h bash-4.2# cat /usr/include/security/pam_modules.h /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* bos610 src/bos/usr/ccs/lib/libpam/security/pam_modules.h 1.2 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* Restricted Materials of IBM */ /* */ /* COPYRIGHT International Business Machines Corp. 2000,2001 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* $XConsortium: pam_modules.h /main/5 1996/05/09 04:25:54 drk $ */ /* * Copyright (c) 1992-1995, by Sun Microsystems, Inc. * All rights reserved. */ #ifndef _PAM_MODULES_H #define _PAM_MODULES_H #ifndef _PAM_APPL_H #include <security/pam_appl.h> #endif #ifdef __cplusplus extern "C" { #endif extern int pam_sm_authenticate( pam_handle_t *pamh, int flags, int argc, const char **argv); extern int pam_sm_setcred( pam_handle_t *pamh, int flags, int argc, const char **argv); extern int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags, int argc, const char **argv); extern int pam_sm_open_session( pam_handle_t *pamh, int flags, int argc, const char **argv); extern int pam_sm_close_session( pam_handle_t *pamh, int flags, int argc, const char **argv); /* * Be careful - there are flags defined for pam_chauthtok() in * pam_appl.h also. */ #define PAM_PRELIM_CHECK 1 #define PAM_UPDATE_AUTHTOK 2 #define PAM_REP_DEFAULT 0x0 #define PAM_REP_FILES 0x01 #define PAM_REP_NIS 0x02 #define PAM_REP_NISPLUS 0x04 #define PAM_OPWCMD 0x08 /* for nispasswd, yppasswd */ #define IS_FILES(x) ((x & PAM_REP_FILES) == PAM_REP_FILES) #define IS_NIS(x) ((x & PAM_REP_NIS) == PAM_REP_NIS) #define IS_NISPLUS(x) ((x & PAM_REP_NISPLUS) == PAM_REP_NISPLUS) #define IS_OPWCMD(x) ((x & PAM_OPWCMD) == PAM_OPWCMD) extern int pam_sm_chauthtok( pam_handle_t *pamh, int flags, int argc, const char **argv); #ifdef __cplusplus } #endif #endif /* _PAM_MODULES_H */ Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ============================================================== 於 2014/5/26 下午9:08, Arran Cudbard-Bell 提到:
Thank you very so much for your support, there still have error message: Can you send me the output of
cat /usr/include/security/pam_modules.h
For some reason the pam function signatures still don't match what you have on your system.
-Arran
bash-4.2# make cc -Wall -fPIC -c src/pam_radius_auth.c -o pam_radius_auth.o src/pam_radius_auth.c:1037:16: error: conflicting types for 'pam_sm_authenticate' PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:36:1: note: previous declaration of 'pam_sm_authenticate' was here pam_sm_authenticate( ^ src/pam_radius_auth.c:1240:16: error: conflicting types for 'pam_sm_setcred' PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:43:1: note: previous declaration of 'pam_sm_setcred' was here pam_sm_setcred( ^ src/pam_radius_auth.c: In function 'pam_private_session': src/pam_radius_auth.c:1256:6: warning: variable 'ctrl' set but not used [-Wunused-but-set-variable] int ctrl; ^ src/pam_radius_auth.c: At top level: src/pam_radius_auth.c:1335:16: error: conflicting types for 'pam_sm_open_session' PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:57:1: note: previous declaration of 'pam_sm_open_session' was here pam_sm_open_session( ^ src/pam_radius_auth.c:1340:16: error: conflicting types for 'pam_sm_close_session' PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:64:1: note: previous declaration of 'pam_sm_close_session' was here pam_sm_close_session( ^ src/pam_radius_auth.c:1349:16: error: conflicting types for 'pam_sm_chauthtok' PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:88:1: note: previous declaration of 'pam_sm_chauthtok' was here pam_sm_chauthtok( ^ src/pam_radius_auth.c:1575:16: error: conflicting types for 'pam_sm_acct_mgmt' PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc,CONST char **argv) ^ In file included from src/pam_radius_auth.h:31:0, from src/pam_radius_auth.c:61: /usr/include/security/pam_modules.h:50:1: note: previous declaration of 'pam_sm_acct_mgmt' was here pam_sm_acct_mgmt( ^ make: 1254-004 The error code from the last command is 1.
Stop. Sam ============================================================== Sam Lin 林立山 Acom Networks E-MAIL : sam@acom-networks.com
OFFICE : +886.2.2313.1416 MOBILE : +886.930.895.633 ==============================================================
cc -Wall -fPIC -c src/md5.c -o md5.o cc -shared -Wl pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so cc: error: unrecognized command line option '-Wl' make: 1254-004 The error code from the last command is 1.
Ok, tweaked it some more, try now?
Arran Cudbard-Bell <a.cudbardb@freeradius.org>
FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
於 2014/5/25 下午5:50, Arran Cudbard-Bell 提到: - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (4)
-
Arran Cudbard-Bell -
Fajar A. Nugraha -
Sam Lin -
Sam 林立山