Package: backuppc / 4.4.0-3

06-fix-rrd-graph-permissions.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Run rrdtool as the backuppc user rather than as the apache user
Origin: https://sourceforge.net/p/backuppc/mailman/message/18724263/
Origin: https://patches.ubuntu.com/b/backuppc/backuppc_3.3.1-4ubuntu2.patch
Author: John Rouillard
Bug: https://sourceforge.net/p/backuppc/mailman/message/18724263/
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/backuppc/+bug/1612600
Bug-Debian: https://bugs.debian.org/903217

--- backuppc-4.3.1.orig/lib/BackupPC/CGI/GeneralInfo.pm
+++ backuppc-4.3.1/lib/BackupPC/CGI/GeneralInfo.pm
@@ -46,8 +46,11 @@
     if ($In{image} ne "") {
 	$In{image} =~ /([0-9]+)/;
 	my $weeks = $1;
+	my $real = $<;  ### SUID
+	$< = $>;        ### SUID
 	print "Content-type: image/png\n\n";
 	print `/usr/bin/rrdtool graph - --imgformat=PNG --start=end-${weeks}w --end=-300 --title="BackupPC Pool Size (${weeks} weeks)" --base=1000 --height=100 --width=600 --alt-autoscale-max --lower-limit=0 --vertical-label="" --slope-mode --font TITLE:10:Times --font AXIS:8:Times --font LEGEND:8:Times --font UNIT:8:Times -c BACK#FFFFFF DEF:ao="$LogDir/pool.rrd":ckb:AVERAGE CDEF:a=ao,1024,* AREA:a#95B8DB:"CPool in bytes"  GPRINT:a:LAST:"Current\\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\\:%8.2lf %s" GPRINT:a:MAX:"Maximum\\:%8.2lf %s\\n"`;
+	$< = $real;   ### SUID
 	return;
     }