diff options
author | 1999-12-12 19:20:02 +0000 | |
---|---|---|
committer | 1999-12-12 19:20:02 +0000 | |
commit | b159466a794e44eec643a082e4e3b3e33434adf6 (patch) | |
tree | 7b007384df185d07beed6ec9656367d43ca5aec8 | |
parent | hide debug printf behind #ifdef PMAPDEBUG (diff) | |
download | wireguard-openbsd-b159466a794e44eec643a082e4e3b3e33434adf6.tar.xz wireguard-openbsd-b159466a794e44eec643a082e4e3b3e33434adf6.zip |
type conflict for 'extern Type *options' in channels.c; dot@dotat.at
-rw-r--r-- | usr.bin/ssh/channels.c | 20 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.c | 5 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.h | 6 | ||||
-rw-r--r-- | usr.bin/ssh/sshd.c | 4 |
4 files changed, 18 insertions, 17 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 11ebe7d48c9..730253eaa62 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -16,7 +16,7 @@ */ #include "includes.h" -RCSID("$Id: channels.c,v 1.32 1999/12/06 12:07:21 deraadt Exp $"); +RCSID("$Id: channels.c,v 1.33 1999/12/12 19:20:02 markus Exp $"); #include "ssh.h" #include "packet.h" @@ -877,11 +877,10 @@ channel_open_message() void channel_request_local_forwarding(u_short port, const char *host, - u_short host_port) + u_short host_port, int gateway_ports) { int ch, sock, on = 1; struct sockaddr_in sin; - extern Options options; struct linger linger; if (strlen(host) > sizeof(channels[0].path) - 1) @@ -895,7 +894,7 @@ channel_request_local_forwarding(u_short port, const char *host, /* Initialize socket address. */ memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; - if (options.gateway_ports == 1) + if (gateway_ports == 1) sin.sin_addr.s_addr = htonl(INADDR_ANY); else sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); @@ -983,9 +982,11 @@ channel_input_port_forward_request(int is_root) if (port < IPPORT_RESERVED && !is_root) packet_disconnect("Requested forwarding of port %d but user is not root.", port); - - /* Initiate forwarding. */ - channel_request_local_forwarding(port, hostname, host_port); + /* + * Initiate forwarding, + * bind port to localhost only (gateway ports == 0). + */ + channel_request_local_forwarding(port, hostname, host_port, 0); /* Free the argument string. */ xfree(hostname); @@ -1116,16 +1117,15 @@ fail: */ char * -x11_create_display_inet(int screen_number) +x11_create_display_inet(int screen_number, int x11_display_offset) { - extern ServerOptions options; int display_number, sock; u_short port; struct sockaddr_in sin; char buf[512]; char hostname[MAXHOSTNAMELEN]; - for (display_number = options.x11_display_offset; + for (display_number = x11_display_offset; display_number < MAX_DISPLAYS; display_number++) { port = 6000 + display_number; diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 0d12676739b..008d1b88f70 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -11,7 +11,7 @@ */ #include "includes.h" -RCSID("$Id: ssh.c,v 1.35 1999/12/01 13:59:15 markus Exp $"); +RCSID("$Id: ssh.c,v 1.36 1999/12/12 19:20:03 markus Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -728,7 +728,8 @@ main(int ac, char **av) options.local_forwards[i].host_port); channel_request_local_forwarding(options.local_forwards[i].port, options.local_forwards[i].host, - options.local_forwards[i].host_port); + options.local_forwards[i].host_port, + options.gateway_ports); } /* Initiate remote TCP/IP port forwardings. */ diff --git a/usr.bin/ssh/ssh.h b/usr.bin/ssh/ssh.h index 241f0b930ff..d63369e8125 100644 --- a/usr.bin/ssh/ssh.h +++ b/usr.bin/ssh/ssh.h @@ -13,7 +13,7 @@ * */ -/* RCSID("$Id: ssh.h,v 1.30 1999/12/06 20:15:29 deraadt Exp $"); */ +/* RCSID("$Id: ssh.h,v 1.31 1999/12/12 19:20:03 markus Exp $"); */ #ifndef SSH_H #define SSH_H @@ -568,7 +568,7 @@ char *channel_open_message(void); */ void channel_request_local_forwarding(u_short port, const char *host, - u_short remote_port); + u_short remote_port, int gateway_ports); /* * Initiate forwarding of connections to port "port" on remote host through @@ -612,7 +612,7 @@ char *x11_create_display(int screen); * Returns a suitable value for the DISPLAY variable, or NULL if an error * occurs. */ -char *x11_create_display_inet(int screen); +char *x11_create_display_inet(int screen, int x11_display_offset); /* * This is called when SSH_SMSG_X11_OPEN is received. The packet contains diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index a1229676045..361127b038d 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -11,7 +11,7 @@ */ #include "includes.h" -RCSID("$Id: sshd.c,v 1.73 1999/12/08 23:59:12 markus Exp $"); +RCSID("$Id: sshd.c,v 1.74 1999/12/12 19:20:03 markus Exp $"); #include <poll.h> @@ -1619,7 +1619,7 @@ do_authenticated(struct passwd * pw) screen = packet_get_int(); else screen = 0; - display = x11_create_display_inet(screen); + display = x11_create_display_inet(screen, options.x11_display_offset); if (!display) goto fail; |