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

« back to all changes in this revision

Viewing changes to ssh-keyscan.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: ssh-keyscan.c,v 1.74 2006/10/06 02:29:19 djm Exp $ */
 
1
/* $OpenBSD: ssh-keyscan.c,v 1.76 2008/04/30 10:14:03 djm Exp $ */
2
2
/*
3
3
 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4
4
 *
56
56
#define KT_DSA  2
57
57
#define KT_RSA  4
58
58
 
59
 
int get_keytypes = KT_RSA1;     /* Get only RSA1 keys by default */
 
59
int get_keytypes = KT_RSA;      /* Get only RSA keys by default */
60
60
 
61
61
int hash_hosts = 0;             /* Hash hostname on output */
62
62
 
358
358
{
359
359
        int j;
360
360
 
361
 
        packet_set_connection(c->c_fd, c->c_fd, timeout);
 
361
        packet_set_connection(c->c_fd, c->c_fd);
362
362
        enable_compat20();
363
363
        myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = c->c_keytype == KT_DSA?
364
364
            "ssh-dss": "ssh-rsa";
410
410
        hints.ai_family = IPv4or6;
411
411
        hints.ai_socktype = SOCK_STREAM;
412
412
        if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
413
 
                fatal("getaddrinfo %s: %s", host, gai_strerror(gaierr));
 
413
                fatal("getaddrinfo %s: %s", host, ssh_gai_strerror(gaierr));
414
414
        for (ai = aitop; ai; ai = ai->ai_next) {
415
415
                s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
416
416
                if (s < 0) {
656
656
        memcpy(e, read_wait, read_wait_nfdset * sizeof(fd_mask));
657
657
 
658
658
        while (select(maxfd, r, NULL, e, &seltime) == -1 &&
659
 
            (errno == EAGAIN || errno == EINTR))
 
659
            (errno == EAGAIN || errno == EINTR || errno == EWOULDBLOCK))
660
660
                ;
661
661
 
662
662
        for (i = 0; i < maxfd; i++) {