Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Andy Isaacson <adisaacs@trurl.resnet.mtu.edu>
Subject: Re: Rsh and rexec
Date: Sun, 30 Nov 1997 14:52:45 -0500	[thread overview]
Message-ID: <52c5a7ab4ea2ecf94d76a6f55d580293.axp-list@archive.invalid> (raw)
In-Reply-To: <65fnm6$b8m@tuegate.tue.nl>

In article <65fnm6$b8m@tuegate.tue.nl>, you wrote:
>It seems you havbe the same problems I id have, my solution is to put the
>machines you try to rlogin/rsh etc. in from in /etc/hosts.equiv. This
>solution isn't the best but it works.
[snip]
>BTW2 Even putting machines in /etc/hosts.equiv won't always work . I have at
>least one machine in /etc/hosts.equiv that also gets permission denied in
>r.... stuff.

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

           reply	other threads:[~1997-11-30 19:52 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <65fnm6$b8m@tuegate.tue.nl>]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox