1
0
mirror of https://passt.top/passt synced 2024-07-01 23:42:41 +00:00

pcap: Don't make pcap files world-readable

Even if it's just a debugging feature, it's not nice to leak packets
to everybody around.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-09-27 00:21:40 +02:00
parent e4b94da0af
commit 11cc43feec

2
pcap.c
View File

@ -186,7 +186,7 @@ void pcap_init(struct ctx *c, int index)
}
pcap_fd = open(c->pcap, O_WRONLY | O_CREAT | O_TRUNC | O_DSYNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
S_IRUSR | S_IWUSR);
if (pcap_fd == -1) {
perror("open");
return;