aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2017-11-23 14:02:22 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-10-05 12:09:45 +0200
commitc5fe7c5a7283b8a6bee0061f5a6ed1a4f76ae274 (patch)
treea608e3fa6367a6545262110392d354c918ac45c4
parentfec4dc4eff715331fc9062f173548d4b4c9bbe90 (diff)
downloadlibssh-c5fe7c5a7283b8a6bee0061f5a6ed1a4f76ae274.tar.gz
libssh-c5fe7c5a7283b8a6bee0061f5a6ed1a4f76ae274.tar.xz
libssh-c5fe7c5a7283b8a6bee0061f5a6ed1a4f76ae274.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> (cherry-picked from commit 5d3ab421)
-rw-r--r--tests/torture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/torture.c b/tests/torture.c
index 743df638..b0ae4ab9 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -703,6 +703,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);
@@ -739,7 +740,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;
}