getaddrinfo() problem with AIX 4.3.3 and rsync 2.5.2?

Allen, John L. ALLENJO5 at mail.northgrum.com
Wed Apr 3 01:27:14 EST 2002


Yes, I had to put "rsync	873/tcp" in /etc/services to make it work at
all, but that still didn't help fix this particular problem.  As I said,
it was passing a large port number to getaddrinfo(), one that's clearly
the client side of a socket connection, and one that is not going to be
in /etc/services anyway.  It looks like it would have worked if either
"873" or "rsync" was passed in port_buf, but it still seems wrong to pass
a transient portnumber.  This problem only became visible when I tried
to use "hosts allow" to restrict access, and wouldn't work until I applied
my patch below.  

-----Original Message-----
From: Terry Raggett [mailto:syr at ecmwf.int]
Sent: Tuesday, April 02, 2002 09:15 AM
To: Allen, John L.; rsync at lists.samba.org
Subject: Re: getaddrinfo() problem with AIX 4.3.3 and rsync 2.5.2?


I have built rsync on Irix 6.5, Fujitsu something, AIX 4.3, Sus Linux 7.x,
HPUX
something. The only one I've had a problem with is AIX 4.3. IBM tell me
getaddrinfo is working as designed and that the port number must be assigned
in
the /etc/services file. I can't see why this should be so, but they aren't
going to change it.

Terry
-----

On Apr 1, 15:26, Allen, John L. wrote:
> Subject: getaddrinfo() problem with AIX 4.3.3 and rsync 2.5.2?
>
> I had to apply the following patch to the clientname.c check_name()
function
> before I could successfully use "hosts allow" in rsyncd.conf.  Without the
> patch I kept getting "rsync: forward name lookup for ... failed: Host not
> found"
> errors.  These errors were produced by the rsync daemon, and putting in a
> debugging statement revealed that the port_buf being used had a large port
> number
> in it (like 32835).  It seems wrong-headed to pass that port to
getaddrinfo
> to check for host name validity, but since I don't know much network
> programming,
> I'll defer to almost anyone :-)
>
> Perhaps it's just AIX 4.3.3 getaddrinfo() that's busted?
>
> $ gdiff -u clientname.c.orig clientname.c
> --- clientname.c.orig   Fri Jan 25 17:59:37 2002
> +++ clientname.c        Mon Apr  1 13:32:10 2002
> @@ -240,7 +240,7 @@
>         hints.ai_family = ss_family;
>         hints.ai_flags = AI_CANONNAME;
>         hints.ai_socktype = SOCK_STREAM;
> -       error = getaddrinfo(name_buf, port_buf, &hints, &res0);
> +       error = getaddrinfo(name_buf, NULL, &hints, &res0);
>         if (error) {
>                 rprintf(FERROR,
>                         RSYNC_NAME ": forward name lookup for %s failed:
> %s\n",
>
> --
>           John L. Allen, Dept 0631, EMS
>             516-346-8456, MS C06-001
> Northrop Grumman Information Technology
>                  Internal Information Services
> --
>  <<JOHN.L.ALLEN.vcf>>
>
> [ Attachment (application/octet-stream): "JOHN.L.ALLEN.vcf" 836 bytes ]
>-- End of excerpt from Allen, John L.






-- 

+-------------------+----------------------------------+--------------------
-+
| Terry Raggett     |                                  |      /~~\  /~~\
|
| ECMWF             | e-mail: terry.raggett at ecmwf.int  |     /    \/    \
|
| Shinfield Park    | Tel:    (+44 118) 949 9358       |   ECMWF       ECMWF
|
| Reading           | Fax:    (+44 118) 986 9450       |   ECMWF       ECMWF
|
| Berkshire RG2 9AX | Telex:  (+44 118) 984 7908       |     \    /\    /
|
| England           |                                  |      \__/  \__/
|
+-------------------+----------------------------------+--------------------
-+
|     ECMWF is the European Centre for Medium-Range Weather Forecasts
|
+---------------------------------------------------------------------------
-+

-- 
To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html




More information about the rsync mailing list