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:
parent
e4b94da0af
commit
11cc43feec
1 changed files with 1 additions and 1 deletions
2
pcap.c
2
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,
|
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) {
|
if (pcap_fd == -1) {
|
||||||
perror("open");
|
perror("open");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue