aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2017-11-23 14:02:22 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-12-15 12:00:49 +0100
commit5d3ab421e1db18d20d5aaa702fbd089552447628 (patch)
treecfdee968d025f5d3b313e79629ee70991e364955
parentf8f7989c3daf92a36c2048a9c373441f2633dd93 (diff)
downloadlibssh-5d3ab421e1db18d20d5aaa702fbd089552447628.tar.gz
libssh-5d3ab421e1db18d20d5aaa702fbd089552447628.tar.xz
libssh-5d3ab421e1db18d20d5aaa702fbd089552447628.zip
tests: Do not generate pcap file by default
pcap file is generated by the processes writing to the sockets, which is not allowed for privilege-separated process in new OpenSSH servers (confined by seccomp filter). Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--tests/torture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/torture.c b/tests/torture.c
index fcd4c148..8486eb41 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -815,6 +815,7 @@ void torture_setup_socket_dir(void **state)
struct torture_state *s;
const char *p;
size_t len;
+ char *env = getenv("TORTURE_GENERATE_PCAP");
s = malloc(sizeof(struct torture_state));
assert_non_null(s);
@@ -851,7 +852,9 @@ void torture_setup_socket_dir(void **state)
setenv("SOCKET_WRAPPER_DIR", p, 1);
setenv("SOCKET_WRAPPER_DEFAULT_IFACE", "170", 1);
- setenv("SOCKET_WRAPPER_PCAP_FILE", s->pcap_file, 1);
+ if (env != NULL && env[0] == '1') {
+ setenv("SOCKET_WRAPPER_PCAP_FILE", s->pcap_file, 1);
+ }
*state = s;
}