Commit e5ef122d authored by Niels Möller's avatar Niels Möller

* src/lshd-connection.c (make_lshd_connection): Condition X11

support on WITH_X11_FORWARD and HAVE_LIBXAU.
* src/server_session.c (x11_request_handler): Likewise.
* src/server_x11.c (server_x11_setup): Likewise.

Rev: ChangeLog:1.1006
Rev: src/lshd-connection.c:1.12
Rev: src/server_session.c:1.116
Rev: src/server_x11.c:1.27
parent 14b92903
2008-11-10 Niels Mller <nisse@lysator.liu.se>
* src/lshd-connection.c (make_lshd_connection): Condition X11
support on WITH_X11_FORWARD and HAVE_LIBXAU.
* src/server_session.c (x11_request_handler): Likewise.
* src/server_x11.c (server_x11_setup): Likewise.
* configure.ac: Use AC_CHECK_LIB to check for libXau.
2008-11-09 Niels Mller <nisse@lysator.liu.se>
......
......@@ -258,6 +258,7 @@ make_lshd_connection(struct lshd_connection_config *config)
{
NEW(lshd_connection, self);
init_ssh_connection(&self->super, kill_lshd_connection, do_write_packet, do_disconnect);
struct alist *requests;
io_register_fd(STDIN_FILENO, "transport read fd");
......@@ -265,16 +266,19 @@ make_lshd_connection(struct lshd_connection_config *config)
self->reader = make_service_read_state();
service_start_read(self);
/* FIXME: Make pty and x11 support configurable. */
/* FIXME: Make pty and x11 support configurable. */
requests = make_alist(4,
ATOM_SHELL, &shell_request_handler,
ATOM_EXEC, &exec_request_handler,
ATOM_PTY_REQ, &pty_request_handler,
ATOM_WINDOW_CHANGE, &window_change_request_handler, -1);
#if defined (WITH_X11_FORWARD) && defined (HAVE_LIBXAU)
ALIST_SET (requests, ATOM_X11_REQ, &x11_request_handler.super);
#endif
ALIST_SET(self->super.channel_types, ATOM_SESSION,
&make_open_session(
make_alist(5,
ATOM_SHELL, &shell_request_handler,
ATOM_EXEC, &exec_request_handler,
ATOM_PTY_REQ, &pty_request_handler,
ATOM_WINDOW_CHANGE, &window_change_request_handler,
ATOM_X11_REQ, &x11_request_handler, -1),
self->config->helper_fd)->super);
&make_open_session(requests,
self->config->helper_fd)->super);
/* FIXME: Make tcpip forwarding optional */
ALIST_SET(self->super.channel_types, ATOM_DIRECT_TCPIP, &channel_open_direct_tcpip.super);
......
......@@ -886,7 +886,7 @@ DEFINE_CHANNEL_REQUEST(window_change_request_handler)
}
#endif /* WITH_PTY_SUPPORT */
#if WITH_X11_FORWARD
#if defined (WITH_X11_FORWARD) && defined (HAVE_LIBXAU)
DEFINE_CHANNEL_REQUEST(x11_request_handler)
(struct channel_request *s UNUSED,
......
......@@ -60,7 +60,11 @@
#include "server_x11.h.x"
#undef GABA_DEFINE
/* FIXME: Use some fallback if libXau is missing? It shouldn't be too
difficult to manually craft an xauthority file with a single
entry. */
#if WITH_X11_FORWARD
#if HAVE_LIBXAU
#ifndef SUN_LEN
# define SUN_LEN(x) \
......@@ -331,4 +335,5 @@ server_x11_setup(struct ssh_channel *channel,
}
}
#endif /* HAVE_LIBXAU */
#endif /* WITH_X11_FORWARD */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment