[BACK]Return to channels.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/channels.c between version 1.30 and 1.31

version 1.30, 1999/11/25 09:10:33 version 1.31, 1999/12/01 13:59:15
Line 82 
Line 82 
  */   */
 typedef struct {  typedef struct {
         char *host;             /* Host name. */          char *host;             /* Host name. */
         int port;               /* Port number. */          u_short port;           /* Port number. */
 } ForwardPermission;  } ForwardPermission;
   
 /* List of all permitted host/port pairs to connect. */  /* List of all permitted host/port pairs to connect. */
Line 876 
Line 876 
  */   */
   
 void  void
 channel_request_local_forwarding(int port, const char *host,  channel_request_local_forwarding(u_short port, const char *host,
                                  int host_port)                                   u_short host_port)
 {  {
         int ch, sock, on = 1;          int ch, sock, on = 1;
         struct sockaddr_in sin;          struct sockaddr_in sin;
Line 932 
Line 932 
  */   */
   
 void  void
 channel_request_remote_forwarding(int port, const char *host,  channel_request_remote_forwarding(u_short port, const char *host,
                                   int remote_port)                                    u_short remote_port)
 {  {
         int payload_len;          int payload_len;
         /* Record locally that connection to this host/port is permitted. */          /* Record locally that connection to this host/port is permitted. */
Line 968 
Line 968 
 void  void
 channel_input_port_forward_request(int is_root)  channel_input_port_forward_request(int is_root)
 {  {
         int port, host_port;          u_short port, host_port;
         char *hostname;          char *hostname;
   
         /* Get arguments from the packet. */          /* Get arguments from the packet. */
Line 976 
Line 976 
         hostname = packet_get_string(NULL);          hostname = packet_get_string(NULL);
         host_port = packet_get_int();          host_port = packet_get_int();
   
         /* Port numbers are 16 bit quantities. */  
         if ((port & 0xffff) != port)  
                 packet_disconnect("Requested forwarding of nonexistent port %d.", port);  
   
         /*          /*
          * Check that an unprivileged user is not trying to forward a           * Check that an unprivileged user is not trying to forward a
          * privileged port.           * privileged port.
Line 1004 
Line 1000 
 void  void
 channel_input_port_open(int payload_len)  channel_input_port_open(int payload_len)
 {  {
         int remote_channel, sock, newch, host_port, i;          int remote_channel, sock, newch, i;
           u_short host_port;
         struct sockaddr_in sin;          struct sockaddr_in sin;
         char *host, *originator_string;          char *host, *originator_string;
         struct hostent *hp;          struct hostent *hp;
Line 1122 
Line 1119 
 x11_create_display_inet(int screen_number)  x11_create_display_inet(int screen_number)
 {  {
         extern ServerOptions options;          extern ServerOptions options;
         int display_number, port, sock;          int display_number, sock;
           u_short port;
         struct sockaddr_in sin;          struct sockaddr_in sin;
         char buf[512];          char buf[512];
         char hostname[MAXHOSTNAMELEN];          char hostname[MAXHOSTNAMELEN];

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31