~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to canohost.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-09-30 23:09:58 UTC
  • mfrom: (1.13.3 upstream) (29 hardy)
  • mto: This revision was merged to the branch mainline in revision 43.
  • Revision ID: james.westby@ubuntu.com-20080930230958-o6vsgn8c4mm959s0
Tags: 1:5.1p1-3
* Remove unnecessary ssh-vulnkey output in non-verbose mode when no
  compromised or unknown keys were found (closes: #496495).
* Configure with --disable-strip; dh_strip will deal with stripping
  binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link;
  closes: #498681).
* Fix handling of zero-length server banners (thanks, Tomas Mraz; closes:
  #497026).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenBSD: canohost.c,v 1.61 2006/08/03 03:34:41 deraadt Exp $ */
 
1
/* $OpenBSD: canohost.c,v 1.63 2008/06/12 00:03:49 dtucker Exp $ */
2
2
/*
3
3
 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4
4
 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
32
32
#include "packet.h"
33
33
#include "log.h"
34
34
#include "canohost.h"
 
35
#include "misc.h"
35
36
 
36
37
static void check_ip_options(int, char *);
37
38
 
88
89
        memset(&hints, 0, sizeof(hints));
89
90
        hints.ai_socktype = SOCK_DGRAM; /*dummy*/
90
91
        hints.ai_flags = AI_NUMERICHOST;
91
 
        if (getaddrinfo(name, "0", &hints, &ai) == 0) {
 
92
        if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
92
93
                logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
93
94
                    name, ntop);
94
95
                freeaddrinfo(ai);
271
272
        if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop,
272
273
            sizeof(ntop), NULL, 0, flags)) != 0) {
273
274
                error("get_socket_address: getnameinfo %d failed: %s", flags,
274
 
                    r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r));
 
275
                    ssh_gai_strerror(r));
275
276
                return NULL;
276
277
        }
277
278
        return xstrdup(ntop);
372
373
        if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0,
373
374
            strport, sizeof(strport), NI_NUMERICSERV)) != 0)
374
375
                fatal("get_sock_port: getnameinfo NI_NUMERICSERV failed: %s",
375
 
                    r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r));
 
376
                    ssh_gai_strerror(r));
376
377
        return atoi(strport);
377
378
}
378
379