hi everybody, i have a problem with radius module for PAM. When i compile the source of pam_radius-1.3.16.tar, i got a lot of erros. I applied patch's available in the list, but the problems persists.<br><br>In the HP-UX enviroments the messages are:
<br><br>begin --------------------<br>[root] patch_pam_radius> make<br>        gcc -z -fPIC -c pam_radius_auth.c -o pam_radius_auth.o<br>pam_radius_auth.c: In function 'talk_radius':<br>pam_radius_auth.c:885: warning: passing argument 6 of 'recvfrom' from incompatible pointer type
<br>pam_radius_auth.c: In function 'rad_converse':<br>pam_radius_auth.c:1021: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1024: warning: passing argument 2 of 'conv->conv' from incompatible pointer type
<br>pam_radius_auth.c: In function 'pam_sm_authenticate':<br>pam_radius_auth.c:1076: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type<br>pam_radius_auth.c:1104: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type
<br>pam_radius_auth.c:1118: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1151: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type<br>pam_radius_auth.c: In function 'pam_sm_setcred':
<br>pam_radius_auth.c:1247: warning: passing argument 3 of 'pam_get_data' from incompatible pointer type<br>pam_radius_auth.c: In function 'pam_private_session':<br>pam_radius_auth.c:1272: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type
<br>pam_radius_auth.c:1293: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type<br>pam_radius_auth.c: In function 'pam_sm_chauthtok':<br>pam_radius_auth.c:1379: warning: passing argument 2 of 'pam_get_user' from incompatible pointer type
<br>pam_radius_auth.c:1400: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1409: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1414: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type
<br>        gcc -z -fPIC -c md5.c<br>        ld -b pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so<br>patch_pam_radius><br>end ------------------------<br><br>Apparently it compels but the pam_radius_auth.so not work, it causes a problem in sshd, follow the error:
<br><br>sshd[20783]: reverse mapping checking getaddrinfo for xxxxx.xxxxx.xxx - POSSIBLE BREAKIN ATTEMPT!<br><br>I Apply this patch for HP-UX:<br><br><pre>=======================================================================
<br><br>Begin output listing from diff -u<br>=======================================================================<br><br>diff -u clean/pam_radius-1.3.16/Makefile pam_radius-1.3.16/Makefile<br>--- clean/pam_radius-1.3.16
/Makefile    2003-09-19 10:41:<br>45.000000000 -0400<br>+++ pam_radius-1.3.16/Makefile  2003-12-23 11:21:26.000000000 -0500<br>@@ -15,7 +15,10 @@<br> #<br> #  If you're not using GCC, then you'll have to change the CFLAGS.
<br> #<br>-CFLAGS = -Wall -fPIC<br>
+#CFLAGS = -Wall -fPIC<br>+# Added by jl 12/09/2003 for HP-UX<br>+CFLAGS = +DAportable +DSPA7100 +z<br>+# End Add jl<br> #<br> # On Irix, use this with MIPSPRo C Compiler, and don't forget to export<br>CC=cc<br> # gcc on Irix does not work yet for pam_radius
<br><br>@@ -55,7 +58,10 @@<br> #      gcc -shared pam_radius_auth.o md5.o -lpam -lc -o pam_radius_auth.so<br> #<br> pam_radius_auth.so: pam_radius_auth.o md5.o<br>-       ld -Bshareable pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so
<br><br>+#      ld -Bshareable pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so<br>+# Added by jl 12/09/2003 for HP-UX<br>+       ld -b pam_radius_auth.o md5.o -lpam -o pam_radius_auth.so<br>+# End add jl<br><br> ######################################################################
<br><br> #<br>diff -u clean/pam_radius-1.3.16/md5.c pam_radius-1.3.16/md5.c<br>--- clean/pam_radius-1.3.16/md5.c       2002-06-28 02:29:21.000000000 -0400<br>+++ pam_radius-1.3.16/md5.c     2004-01-12 11:58:22.000000000 -0500
<br><br>@@ -43,6 +43,12 @@<br> #define HIGHFIRST<br> #endif<br><br>+/* 01/12/2004 jl - Added for HPUX compiles */<br>+#ifdef _INCLUDE_HPUX_SOURCE<br>+#define HIGHFIRST<br>+#endif<br>+/* END jl */<br>+<br> #ifndef HIGHFIRST
<br>
 #define byteReverse(buf, len)  /* Nothing */<br> #else<br>diff -u clean/pam_radius-1.3.16/md5.h pam_radius-1.3.16/md5.h<br>--- clean/pam_radius-1.3.16/md5.h       2003-04-29 16:19:16.000000000 -0400<br>+++ pam_radius-1.3.16
<br>/md5.h     2003-12-16 11:33:55.000000000 -0500<br>@@ -15,7 +15,10 @@<br> #define MD5Transform  pra_MD5Transform<br><br> #include <sys/types.h><br>-#define uint32 u_int32_t<br>+/* Added by jl */<br>+/* #define u_int32_t unsigned int */
<br><br>+/* #define uint32 u_int32_t */<br>+#define uint32 uint32_t<br><br> struct MD5Context {<br>     uint32 buf[4];<br>Only in pam_radius-1.3.16: md5.o<br>diff -u clean/pam_radius-1.3.16/pam_radius_auth.c<br>pam_radius-
1.3.16<br>/pam_radius_auth.c<br>--- clean/pam_radius-1.3.16/pam_radius_auth.c   2003-02-27<br>13:01:07.000000000 -0500<br>+++ pam_radius-1.3.16/pam_radius_auth.c 2004-01-12 12:00:52.000000000 -0500<br>@@ -58,6 +58,11 @@<br>
 #ifdef sun<br><br> #include <security/pam_appl.h><br> #endif<br>+/* Added by jl 12/09/2003 */<br>+#ifdef _INCLUDE_HPUX_SOURCE<br>+#include <security/pam_appl.h><br>+#endif<br>+/* End add jl */<br> #include <security/pam_modules.h>
<br><br><br> #include "pam_radius_auth.h"<br>diff -u clean/pam_radius-1.3.16/pam_radius_auth.h<br>pam_radius-1.3.16/pam_radius_auth.h<br>--- clean/pam_radius-1.3.16/pam_radius_auth.h   2003-09-19<br>10:41:32.000000000
<br> -0400<br>+++ pam_radius-1.3.16/pam_radius_auth.h 2003-12-09 10:20:29.000000000 -0500<br>@@ -66,6 +66,11 @@<br>  */<br> #define CONST const<br> #else<br>+/* Added by jl 12/09/2003 */<br>+#ifdef _INCLUDE_HPUX_SOURCE<br>
+#define PAM_EXTERN extern<br><br>+#endif<br>+/* End add jl */<br> #define CONST const<br> #endif<br><br>=======================================================================<br>End output listing from diff -u<br><br><br>
<br>=======================================================================<br></pre><br>In AIX i applied this modifications in md5.h, md5.c and pam_radius_auth.h<br><br><pre>- change to the md5.h file. Change line 18 from:
<br>           #define uint32 u_int32_t<br>         to<br>           #define uint32 uint32_t<br><br>       - in md5.c, insert to line 38 (before any #include lines)<br>           #define __sparc<br>       - in pam_radius_auth.h, line 60, insert after the comment section
<br>but<br>         before "#ifdef sun":<br><br>            #define sun</pre><br>the output for the command cc -z -fPIC -c md5.c -o md5.o it's ok. No errors.<br>the output for the command cc -z -fPIC -c pam_radius_auth.c -o pam_radius_auth.o. the following ones:
<br>
<br><br>pam_radius_auth.c: In function `talk_radius':<br>pam_radius_auth.c:880: warning: passing arg 6 of `nrecvfrom' from incompatible pointer type<br>pam_radius_auth.c: In function `rad_converse':<br>pam_radius_auth.c:1016: warning: passing arg 3 of `pam_get_item' from incompatible pointer type
<br>pam_radius_auth.c:1019: warning: passing arg 2 of pointer to function from incompatible pointer type<br>pam_radius_auth.c: In function `pam_sm_authenticate':<br>pam_radius_auth.c:1071: warning: passing arg 2 of `pam_get_user' from incompatible pointer type
<br>pam_radius_auth.c:1099: warning: passing arg 3 of `pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1113: warning: passing arg 3 of `pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1146: warning: passing arg 3 of `pam_get_item' from incompatible pointer type
<br>pam_radius_auth.c: In function `pam_sm_setcred':<br>pam_radius_auth.c:1242: warning: passing arg 3 of `pam_get_data' from incompatible pointer type<br>pam_radius_auth.c: In function `pam_private_session':<br>pam_radius_auth.c:1267: warning: passing arg 2 of `pam_get_user' from incompatible pointer type
<br>pam_radius_auth.c:1288: warning: passing arg 3 of `pam_get_item' from incompatible pointer type<br>pam_radius_auth.c: In function `pam_sm_chauthtok':<br>pam_radius_auth.c:1374: warning: passing arg 2 of `pam_get_user' from incompatible pointer type
<br>pam_radius_auth.c:1395: warning: passing arg 3 of `pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1404: warning: passing arg 3 of `pam_get_item' from incompatible pointer type<br>pam_radius_auth.c:1409: warning: passing arg 3 of `pam_get_item' from incompatible pointer type
<br><br>When i try the ld:<br><br>ld -G md5.o pam_radius_auth.o -o pam_radius_auth.so<br><br>the following ones occurs:<br><br>ld: 0711-327 WARNING: Entry point not found: __start<br>ld: 0711-244 ERROR: No csects or exported symbols have been saved.
<br><br>I'm really need of this solution.<br>Somebody can help me, with this problems???<br><br><br>-- <br>Arthur<br>