aboutgitcodebugslistschat
path: root/pcap.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-27 00:21:40 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-27 01:28:02 +0200
commit11cc43feec0e2bb7e9636acd8169676d231715e0 (patch)
tree2b77d44f5916835fab5516cb2d60ce67ebc7f61b /pcap.c
parente4b94da0af90e7ab707fd32d9e09e7bd767996df (diff)
downloadpasst-11cc43feec0e2bb7e9636acd8169676d231715e0.tar
passt-11cc43feec0e2bb7e9636acd8169676d231715e0.tar.gz
passt-11cc43feec0e2bb7e9636acd8169676d231715e0.tar.bz2
passt-11cc43feec0e2bb7e9636acd8169676d231715e0.tar.lz
passt-11cc43feec0e2bb7e9636acd8169676d231715e0.tar.xz
passt-11cc43feec0e2bb7e9636acd8169676d231715e0.tar.zst
passt-11cc43feec0e2bb7e9636acd8169676d231715e0.zip
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>
Diffstat (limited to 'pcap.c')
-rw-r--r--pcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap.c b/pcap.c
index 1d7dd49..e9012cd 100644
--- a/pcap.c
+++ b/pcap.c
@@ -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;