Imported Upstream version 0.5
Laurent Bigonville
12 years ago
0 | NEW in 0.5 | |
1 | ========== | |
2 | ||
3 | - Fixes bug #33579 - allow user to pass options to the ssh client | |
4 | ||
0 | 5 | NEW in 0.4 |
1 | 6 | ========== |
2 | 7 |
1027 | 1027 | Consider adjusting the PKG_CONFIG_PATH environment variable if you |
1028 | 1028 | installed software in a non-standard prefix. |
1029 | 1029 | |
1030 | _PKG_TEXT])dnl | |
1030 | _PKG_TEXT])[]dnl | |
1031 | 1031 | ]) |
1032 | 1032 | elif test $pkg_failed = untried; then |
1033 | 1033 | AC_MSG_RESULT([no]) |
1038 | 1038 | |
1039 | 1039 | _PKG_TEXT |
1040 | 1040 | |
1041 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl | |
1041 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl | |
1042 | 1042 | ]) |
1043 | 1043 | else |
1044 | 1044 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.67 for ssh-contact 0.4. | |
2 | # Generated by GNU Autoconf 2.67 for ssh-contact 0.5. | |
3 | 3 | # |
4 | 4 | # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact>. |
5 | 5 | # |
705 | 705 | # Identity of this package. |
706 | 706 | PACKAGE_NAME='ssh-contact' |
707 | 707 | PACKAGE_TARNAME='ssh-contact' |
708 | PACKAGE_VERSION='0.4' | |
709 | PACKAGE_STRING='ssh-contact 0.4' | |
708 | PACKAGE_VERSION='0.5' | |
709 | PACKAGE_STRING='ssh-contact 0.5' | |
710 | 710 | PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact' |
711 | 711 | PACKAGE_URL='' |
712 | 712 | |
1500 | 1500 | # Omit some internal or obsolete options to make the list less imposing. |
1501 | 1501 | # This message is too long to be a string in the A/UX 3.1 sh. |
1502 | 1502 | cat <<_ACEOF |
1503 | \`configure' configures ssh-contact 0.4 to adapt to many kinds of systems. | |
1503 | \`configure' configures ssh-contact 0.5 to adapt to many kinds of systems. | |
1504 | 1504 | |
1505 | 1505 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1506 | 1506 | |
1574 | 1574 | |
1575 | 1575 | if test -n "$ac_init_help"; then |
1576 | 1576 | case $ac_init_help in |
1577 | short | recursive ) echo "Configuration of ssh-contact 0.4:";; | |
1577 | short | recursive ) echo "Configuration of ssh-contact 0.5:";; | |
1578 | 1578 | esac |
1579 | 1579 | cat <<\_ACEOF |
1580 | 1580 | |
1698 | 1698 | test -n "$ac_init_help" && exit $ac_status |
1699 | 1699 | if $ac_init_version; then |
1700 | 1700 | cat <<\_ACEOF |
1701 | ssh-contact configure 0.4 | |
1701 | ssh-contact configure 0.5 | |
1702 | 1702 | generated by GNU Autoconf 2.67 |
1703 | 1703 | |
1704 | 1704 | Copyright (C) 2010 Free Software Foundation, Inc. |
2071 | 2071 | This file contains any messages produced by compilers while |
2072 | 2072 | running configure, to aid debugging if configure makes a mistake. |
2073 | 2073 | |
2074 | It was created by ssh-contact $as_me 0.4, which was | |
2074 | It was created by ssh-contact $as_me 0.5, which was | |
2075 | 2075 | generated by GNU Autoconf 2.67. Invocation command line was |
2076 | 2076 | |
2077 | 2077 | $ $0 $@ |
2918 | 2918 | |
2919 | 2919 | # Define the identity of the package. |
2920 | 2920 | PACKAGE='ssh-contact' |
2921 | VERSION='0.4' | |
2921 | VERSION='0.5' | |
2922 | 2922 | |
2923 | 2923 | |
2924 | 2924 | # Some tools Automake needs. |
14748 | 14748 | # report actual input values of CONFIG_FILES etc. instead of their |
14749 | 14749 | # values after options handling. |
14750 | 14750 | ac_log=" |
14751 | This file was extended by ssh-contact $as_me 0.4, which was | |
14751 | This file was extended by ssh-contact $as_me 0.5, which was | |
14752 | 14752 | generated by GNU Autoconf 2.67. Invocation command line was |
14753 | 14753 | |
14754 | 14754 | CONFIG_FILES = $CONFIG_FILES |
14814 | 14814 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
14815 | 14815 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
14816 | 14816 | ac_cs_version="\\ |
14817 | ssh-contact config.status 0.4 | |
14817 | ssh-contact config.status 0.5 | |
14818 | 14818 | configured by $0, generated by GNU Autoconf 2.67, |
14819 | 14819 | with options \\"\$ac_cs_config\\" |
14820 | 14820 |
0 | 0 | m4_define(released, 1) |
1 | AC_INIT(ssh-contact, 0.4, https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact) | |
1 | AC_INIT(ssh-contact, 0.5, https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=ssh-contact) | |
2 | 2 | AC_PREREQ(2.59) |
3 | 3 | AC_COPYRIGHT([ |
4 | 4 | Copyright (C) 2010 Collabora Ltd. |
259 | 259 | GStrv |
260 | 260 | _client_create_exec_args (GSocket *socket, |
261 | 261 | const gchar *contact_id, |
262 | const gchar *username) | |
262 | const gchar *username, | |
263 | gchar **ssh_opts) | |
263 | 264 | { |
264 | 265 | GPtrArray *args; |
265 | 266 | GSocketAddress *socket_address; |
267 | 268 | guint16 port; |
268 | 269 | gchar *host; |
269 | 270 | gchar *str; |
271 | gchar **opt; | |
270 | 272 | |
271 | 273 | /* Get the local host and port on which sshd is running */ |
272 | 274 | socket_address = g_socket_get_local_address (socket, NULL); |
297 | 299 | g_ptr_array_add (args, g_strdup (username)); |
298 | 300 | } |
299 | 301 | |
302 | if (ssh_opts != NULL) | |
303 | { | |
304 | for (opt = ssh_opts; *opt != NULL; opt++) | |
305 | { | |
306 | g_ptr_array_add (args, g_strdup (*opt)); | |
307 | } | |
308 | } | |
309 | ||
300 | 310 | g_ptr_array_add (args, NULL); |
301 | 311 | |
302 | 312 | return (gchar **) g_ptr_array_free (args, FALSE); |
34 | 34 | GSocket *_client_create_local_socket (GError **error); |
35 | 35 | |
36 | 36 | GStrv _client_create_exec_args (GSocket *socket, const gchar *contact_id, |
37 | const gchar *username); | |
37 | const gchar *username, gchar **ssh_opts); | |
38 | 38 | |
39 | 39 | gboolean _capabilities_has_stream_tube (TpCapabilities *caps); |
40 | 40 |
37 | 37 | gchar *account_path; |
38 | 38 | gchar *contact_id; |
39 | 39 | gchar *login; |
40 | gchar **ssh_opts; | |
40 | 41 | |
41 | 42 | GList *accounts; |
42 | 43 | guint n_readying_connections; |
175 | 176 | ssh_socket_connected_cb, context); |
176 | 177 | |
177 | 178 | args = _client_create_exec_args (socket, context->contact_id, |
178 | context->login); | |
179 | context->login, context->ssh_opts); | |
179 | 180 | |
180 | 181 | /* spawn ssh client */ |
181 | 182 | if (g_spawn_async (NULL, args, NULL, |
538 | 539 | g_free (context->account_path); |
539 | 540 | g_free (context->contact_id); |
540 | 541 | g_free (context->login); |
542 | g_strfreev (context->ssh_opts); | |
541 | 543 | |
542 | 544 | g_list_foreach (context->accounts, (GFunc) g_object_unref, NULL); |
543 | 545 | g_list_free (context->accounts); |
568 | 570 | 0, G_OPTION_ARG_STRING, &context.login, |
569 | 571 | "Specifies the user to log in as on the remote machine", |
570 | 572 | NULL }, |
573 | { G_OPTION_REMAINING, 0, | |
574 | 0, G_OPTION_ARG_STRING_ARRAY, &context.ssh_opts, | |
575 | NULL, | |
576 | NULL }, | |
571 | 577 | { NULL } |
572 | 578 | }; |
573 | 579 | |
574 | 580 | g_type_init (); |
575 | 581 | |
576 | optcontext = g_option_context_new ("- ssh-contact"); | |
582 | optcontext = g_option_context_new ("-- [OPTIONS FOR SSH CLIENT]"); | |
577 | 583 | g_option_context_add_main_entries (optcontext, options, NULL); |
578 | 584 | if (!g_option_context_parse (optcontext, &argc, &argv, &error)) |
579 | 585 | { |
216 | 216 | ssh_socket_connected_cb, self); |
217 | 217 | |
218 | 218 | get_connection_info (self, NULL, &contact_id, &username); |
219 | args = _client_create_exec_args (socket, contact_id, username); | |
219 | args = _client_create_exec_args (socket, contact_id, username, NULL); | |
220 | 220 | vte_terminal_fork_command (VTE_TERMINAL (self->priv->vte), "ssh", args, |
221 | 221 | NULL, NULL, FALSE, FALSE, FALSE); |
222 | 222 |