[rrd-developers] [PATCH] check permissions before writing to journal
kevin brintnall
kbrint at rufus.net
Mon Sep 29 22:56:00 CEST 2008
---
src/rrd_daemon.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index a0e6bdb..5163f34 100644
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
@@ -1339,14 +1339,14 @@ static int handle_request (int fd, socket_privilege privilege, /* {{{ */
if (strcasecmp (command, "update") == 0)
{
- /* don't re-write updates in replay mode */
- if (fd >= 0)
- journal_write(command, buffer_ptr);
-
status = has_privilege(privilege, PRIV_HIGH, fd);
if (status <= 0)
return status;
+ /* don't re-write updates in replay mode */
+ if (fd >= 0)
+ journal_write(command, buffer_ptr);
+
return (handle_request_update (fd, buffer_ptr, buffer_size));
}
else if (strcasecmp (command, "wrote") == 0 && fd < 0)
--
1.6.0.2
More information about the rrd-developers
mailing list