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

« back to all changes in this revision

Viewing changes to openbsd-compat/bindresvport.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
1
/* This file has be substantially modified from the original OpenBSD source */
2
2
 
3
 
/*      $OpenBSD: bindresvport.c,v 1.16 2005/04/01 07:44:03 otto Exp $  */
 
3
/*      $OpenBSD: bindresvport.c,v 1.17 2005/12/21 01:40:22 millert Exp $       */
4
4
 
5
5
/*
6
6
 * Copyright 1996, Jason Downs.  All rights reserved.
54
54
{
55
55
        int error, af;
56
56
        struct sockaddr_storage myaddr;
57
 
        struct sockaddr_in *sin;
58
 
        struct sockaddr_in6 *sin6;
 
57
        struct sockaddr_in *in;
 
58
        struct sockaddr_in6 *in6;
59
59
        u_int16_t *portp;
60
60
        u_int16_t port;
61
61
        socklen_t salen;
74
74
                af = sa->sa_family;
75
75
 
76
76
        if (af == AF_INET) {
77
 
                sin = (struct sockaddr_in *)sa;
 
77
                in = (struct sockaddr_in *)sa;
78
78
                salen = sizeof(struct sockaddr_in);
79
 
                portp = &sin->sin_port;
 
79
                portp = &in->sin_port;
80
80
        } else if (af == AF_INET6) {
81
 
                sin6 = (struct sockaddr_in6 *)sa;
 
81
                in6 = (struct sockaddr_in6 *)sa;
82
82
                salen = sizeof(struct sockaddr_in6);
83
 
                portp = &sin6->sin6_port;
 
83
                portp = &in6->sin6_port;
84
84
        } else {
85
85
                errno = EPFNOSUPPORT;
86
86
                return (-1);