diff options
author | Jeff Burdges <burdges@gnunet.org> | 2015-10-27 11:12:14 +0000 |
---|---|---|
committer | Jeff Burdges <burdges@gnunet.org> | 2015-10-27 11:12:14 +0000 |
commit | 572ed5a20edf2e273ae377473b52bfee98eca24e (patch) | |
tree | 755a09517b700fcd565fd776db21947eedab3e5c | |
parent | 2af25b50fc8d589e2cb1b40bfc11cf1a7e70678d (diff) | |
download | gnunet-572ed5a20edf2e273ae377473b52bfee98eca24e.tar.gz gnunet-572ed5a20edf2e273ae377473b52bfee98eca24e.zip |
Use SSH more safely from configure
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/util/Makefile.am | 2 | ||||
-rw-r--r-- | src/util/test_socks.c | 13 |
3 files changed, 8 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index f1a30ead2..3f625f1d5 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -202,6 +202,7 @@ AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) | |||
202 | 202 | ||
203 | AC_CHECK_PROG(VAR_SSH_BINARY,ssh,true,false) | 203 | AC_CHECK_PROG(VAR_SSH_BINARY,ssh,true,false) |
204 | AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) | 204 | AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) |
205 | AM_CONDITIONAL(HAVE_SSH_KEY, ssh -D 12345 -o "BatchMode yes" -o "UserKnownHostsFile /tmp/gnunet_test_cosks_ssh_garbage" -o "StrictHostKeyChecking no" 127.0.0.1 echo -n) | ||
205 | 206 | ||
206 | 207 | ||
207 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 208 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, |
diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 896ef17eb..65b53b91d 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am | |||
@@ -256,7 +256,7 @@ if HAVE_BENCHMARKS | |||
256 | perf_malloc | 256 | perf_malloc |
257 | endif | 257 | endif |
258 | 258 | ||
259 | if HAVE_SSH_BINARY | 259 | if HAVE_SSH_KEY |
260 | SSH_USING_TESTS = test_socks.nc | 260 | SSH_USING_TESTS = test_socks.nc |
261 | endif | 261 | endif |
262 | 262 | ||
diff --git a/src/util/test_socks.c b/src/util/test_socks.c index 5ca086ee1..97f614cd4 100644 --- a/src/util/test_socks.c +++ b/src/util/test_socks.c | |||
@@ -186,13 +186,12 @@ main (int argc, char *argv[]) | |||
186 | if (pid == 0) | 186 | if (pid == 0) |
187 | { | 187 | { |
188 | execlp ("ssh", | 188 | execlp ("ssh", |
189 | "ssh", | 189 | "ssh","-D",socksport, |
190 | "-D", | 190 | "-o","BatchMode yes", |
191 | socksport, | 191 | "-o","UserKnownHostsFile /tmp/gnunet_test_socks_ssh_garbage", |
192 | "127.0.0.1", | 192 | "-o","StrictHostKeyChecking no", |
193 | "-N", | 193 | "127.0.0.1","-N",(char*)NULL); |
194 | NULL); | 194 | perror ("execlp (\"ssh\",\"ssh\",...,\"-D\",\"1081\",\"127.0.0.1\",\"-N\") "); |
195 | perror ("execlp (\"ssh\",\"ssh\",\"-D\",\"1081\",\"127.0.0.1\",\"-N\") "); | ||
196 | printf ("" | 195 | printf ("" |
197 | "Please ensure you have ssh installed and have sshd installed and running :\n" | 196 | "Please ensure you have ssh installed and have sshd installed and running :\n" |
198 | "\tsudo apt-get install openssh-client openssh-server\n" | 197 | "\tsudo apt-get install openssh-client openssh-server\n" |