I had some problems with pam_rhosts that I traced down to some 32/64
bittiness issues in pam_rhosts_auth.c from Linux-PAM-0.57. Looking at the
0.59 sources from the Mustang distribution, I don't see any changes in
there, so I'm afraid that 5.0 won't fix these problems. Anyway, the
following patch fixed all my .rhosts problems. I'd appreciate a note if
this patch solves the problems for anybody else.
I'll put up a precompiled pam_rhosts_auth.so (as well as this patch) at
http://www.sas.it.mtu.edu/~adisaacs/rhosts/
-andy
--- pam_rhosts_auth.c.orig Sat Apr 5 01:27:59 1997
+++ pam_rhosts_auth.c Fri Sep 19 01:32:45 1997
@@ -220,7 +220,7 @@
, register char *lhost, const char *rhost)
{
struct hostent *hp;
- u_long laddr;
+ unsigned int laddr;
int negate=1; /* Multiply return with this to get -1 instead of 1 */
char **pp, *user;
@@ -246,7 +246,7 @@
}
/* Try for raw ip address first. */
- if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1)
+ if (isdigit(*lhost) && (int)(laddr = inet_addr(lhost)) != -1)
return (negate*(! (raddr ^ laddr)));
/* Better be a hostname. */
@@ -256,7 +256,7 @@
/* Spin through ip addresses. */
for (pp = hp->h_addr_list; *pp; ++pp)
- if (!memcmp (&raddr, *pp, sizeof (unsigned long)))
+ if (!memcmp (&raddr, *pp, sizeof (unsigned int)))
return (negate);
/* No match. */
-- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
Copyright © 1995-1997 Red Hat Software. Legal notices