projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5303c9
)
pf plugin: read permissions are enough for /dev/pf
author
Stefan Rinkes
<stefan.rinkes@gmail.com>
Sun, 17 Apr 2011 09:14:07 +0000
(11:14 +0200)
committer
Stefan Rinkes
<stefan.rinkes@gmail.com>
Sun, 17 Apr 2011 09:14:07 +0000
(11:14 +0200)
src/pf.c
patch
|
blob
|
history
diff --git
a/src/pf.c
b/src/pf.c
index
7c677bf
..
9d99e3a
100644
(file)
--- a/
src/pf.c
+++ b/
src/pf.c
@@
-48,7
+48,7
@@
pf_init(void)
{
struct pf_status status;
- if ((dev = open(PF_SOCKET, O_RD
WR
)) == -1) {
+ if ((dev = open(PF_SOCKET, O_RD
ONLY
)) == -1) {
return (-1);
}
if (ioctl(dev, DIOCGETSTATUS, &status) == -1) {
@@
-72,7
+72,7
@@
pf_read(void)
char *lnames[] = LCNT_NAMES;
char *names[] = { "searches", "inserts", "removals" };
- if ((dev = open(PF_SOCKET, O_RD
WR
)) == -1) {
+ if ((dev = open(PF_SOCKET, O_RD
ONLY
)) == -1) {
return (-1);
}
if (ioctl(dev, DIOCGETSTATUS, &status) == -1) {