getaddrinfo() problem with AIX 4.3.3 and rsync 2.5.2?
Terry Raggett
syr at ecmwf.int
Wed Apr 3 00:14:35 EST 2002
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 |
+----------------------------------------------------------------------------+
More information about the rsync
mailing list