From: oetiker Date: Fri, 11 Jun 2010 15:09:28 +0000 (+0000) Subject: rrd_daemon handle_request_fetch needs to convert to absolute path -- Thorsten von... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=34bcc0f4336517f83dbc30c5214f18bf192fb9fc;p=rrdtool-all.git rrd_daemon handle_request_fetch needs to convert to absolute path -- Thorsten von Eicken git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@2090 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index 4c7b6bd2..4c3d7ed4 100644 --- a/program/src/rrd_daemon.c +++ b/program/src/rrd_daemon.c @@ -1476,7 +1476,7 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ */ static int handle_request_fetch (HANDLER_PROTO) /* {{{ */ { - char *file; + char *file, file_tmp[PATH_MAX]; char *cf; char *start_str; @@ -1530,6 +1530,9 @@ static int handle_request_fetch (HANDLER_PROTO) /* {{{ */ if (status != 0) return (syntax_error(sock,cmd)); + get_abs_path(&file, file_tmp); + if (!check_file_access(file, sock)) return 0; + status = flush_file (file); if ((status != 0) && (status != ENOENT)) return (send_response (sock, RESP_ERR,