diff --git a/Makefile.am b/Makefile.am index 9377e66a..234ad840 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 Glyptodon LLC +# Copyright (C) 2015 Glyptodon LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -26,6 +26,7 @@ ACLOCAL_AMFLAGS = -I m4 DIST_SUBDIRS = \ src/libguac \ src/common \ + src/common-ssh \ src/terminal \ src/guacd \ src/protocols/rdp \ @@ -40,6 +41,10 @@ SUBDIRS = \ src/guacd \ tests +if ENABLE_COMMON_SSH + SUBDIRS += src/common-ssh +endif + if ENABLE_TERMINAL SUBDIRS += src/terminal endif diff --git a/configure.ac b/configure.ac index b10f5ca8..4cc773ea 100644 --- a/configure.ac +++ b/configure.ac @@ -117,6 +117,10 @@ AC_SUBST([LIBGUAC_INCLUDE], '-I$(top_srcdir)/src/libguac') AC_SUBST([COMMON_LTLIB], '$(top_builddir)/src/common/libguac_common.la') AC_SUBST([COMMON_INCLUDE], '-I$(top_srcdir)/src/common') +# Common base SSH client +AC_SUBST([COMMON_SSH_LTLIB], '$(top_builddir)/src/common-ssh/libguac_common_ssh.la') +AC_SUBST([COMMON_SSH_INCLUDE], '-I$(top_srcdir)/src/common-ssh') + # Terminal emulator AC_SUBST([TERMINAL_LTLIB], '$(top_builddir)/src/terminal/libguac_terminal.la') AC_SUBST([TERMINAL_INCLUDE], '-I$(top_srcdir)/src/terminal $(PANGO_CFLAGS) $(PANGOCAIRO_CFLAGS) $(COMMON_INCLUDE)') @@ -834,6 +838,9 @@ then [have_libssh2=no]) fi +AM_CONDITIONAL([ENABLE_COMMON_SSH], [test "x${have_libssh2}" = "xyes" \ + -a "x${have_ssl}" = "xyes"]) + AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh2}" = "xyes" \ -a "x${have_terminal}" = "xyes" \ -a "x${have_ssl}" = "xyes"]) @@ -920,6 +927,7 @@ AC_SUBST(TELNET_LIBS) AC_CONFIG_FILES([Makefile tests/Makefile src/common/Makefile + src/common-ssh/Makefile src/terminal/Makefile src/libguac/Makefile src/guacd/Makefile diff --git a/src/common-ssh/Makefile.am b/src/common-ssh/Makefile.am new file mode 100644 index 00000000..2720ed50 --- /dev/null +++ b/src/common-ssh/Makefile.am @@ -0,0 +1,37 @@ +# +# Copyright (C) 2015 Glyptodon LLC +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = -Werror -Wall -pedantic @LIBGUAC_INCLUDE@ @COMMON_INCLUDE@ + +noinst_LTLIBRARIES = libguac_common_ssh.la + +libguac_common_ssh_la_SOURCES = \ + guac_ssh_config.c + +noinst_HEADERS = \ + guac_ssh_config.h + +libguac_common_ssh_la_LIBADD = @LIBGUAC_LTLIB@ +libguac_common_ssh_la_LDFLAGS = @SSH_LIBS@ @SSL_LIBS@ @PTHREAD_LIBS@ + diff --git a/src/common-ssh/guac_ssh_config.c b/src/common-ssh/guac_ssh_config.c new file mode 100644 index 00000000..65aa76b8 --- /dev/null +++ b/src/common-ssh/guac_ssh_config.c @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2015 Glyptodon LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "guac_ssh_config.h" + +void guac_common_ssh_connect() { + /* STUB */ +} + diff --git a/src/common-ssh/guac_ssh_config.h b/src/common-ssh/guac_ssh_config.h new file mode 100644 index 00000000..7c2b6f0d --- /dev/null +++ b/src/common-ssh/guac_ssh_config.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2015 Glyptodon LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + +#ifndef GUAC_COMMON_SSH_CONFIG_H +#define GUAC_COMMON_SSH_CONFIG_H + +/** + * STUB + */ +void guac_common_ssh_connect(); + +#endif + diff --git a/src/protocols/ssh/Makefile.am b/src/protocols/ssh/Makefile.am index 28dd9d8f..65a7e538 100644 --- a/src/protocols/ssh/Makefile.am +++ b/src/protocols/ssh/Makefile.am @@ -50,7 +50,7 @@ libguac_client_ssh_la_SOURCES += ssh_agent.c noinst_HEADERS += ssh_agent.h endif -libguac_client_ssh_la_CFLAGS = -Werror -Wall -Iinclude @LIBGUAC_INCLUDE@ @TERMINAL_INCLUDE@ -libguac_client_ssh_la_LIBADD = @LIBGUAC_LTLIB@ @TERMINAL_LTLIB@ +libguac_client_ssh_la_CFLAGS = -Werror -Wall -Iinclude @LIBGUAC_INCLUDE@ @TERMINAL_INCLUDE@ @COMMON_SSH_INCLUDE@ +libguac_client_ssh_la_LIBADD = @LIBGUAC_LTLIB@ @TERMINAL_LTLIB@ @COMMON_SSH_LTLIB@ libguac_client_ssh_la_LDFLAGS = -version-info 0:0:0 @SSH_LIBS@ @SSL_LIBS@ @PTHREAD_LIBS@