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.tokkee.org/?a=commitdiff_plain;h=dda641e49183f440584a1bbdfd1d676afd824476;p=rrdtool-all.git check permissions before writing to journal -- kevin git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1550 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index a0e6bdbf..5163f34b 100644 --- a/program/src/rrd_daemon.c +++ b/program/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)