mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
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)
This commit is contained in:
committed by
Andreas Schneider
parent
fec4dc4eff
commit
c5fe7c5a72
@@ -703,6 +703,7 @@ void torture_setup_socket_dir(void **state)
|
|||||||
struct torture_state *s;
|
struct torture_state *s;
|
||||||
const char *p;
|
const char *p;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
char *env = getenv("TORTURE_GENERATE_PCAP");
|
||||||
|
|
||||||
s = malloc(sizeof(struct torture_state));
|
s = malloc(sizeof(struct torture_state));
|
||||||
assert_non_null(s);
|
assert_non_null(s);
|
||||||
@@ -739,7 +740,9 @@ void torture_setup_socket_dir(void **state)
|
|||||||
|
|
||||||
setenv("SOCKET_WRAPPER_DIR", p, 1);
|
setenv("SOCKET_WRAPPER_DIR", p, 1);
|
||||||
setenv("SOCKET_WRAPPER_DEFAULT_IFACE", "170", 1);
|
setenv("SOCKET_WRAPPER_DEFAULT_IFACE", "170", 1);
|
||||||
|
if (env != NULL && env[0] == '1') {
|
||||||
setenv("SOCKET_WRAPPER_PCAP_FILE", s->pcap_file, 1);
|
setenv("SOCKET_WRAPPER_PCAP_FILE", s->pcap_file, 1);
|
||||||
|
}
|
||||||
|
|
||||||
*state = s;
|
*state = s;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user