From: oetiker Date: Tue, 30 Sep 2008 18:43:15 +0000 (+0000) Subject: check permissions before writing to journal -- kevin X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=692408d69df63d4aef3f9d0542edeef8c64a9eaa;p=rrdtool.git check permissions before writing to journal -- kevin git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1550 a5681a0c-68f1-0310-ab6d-d61299d08faa --- 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)