|
From: Ethan M. <merritt@u.washington.edu> - 2006-12-28 18:10:21
|
On Thursday 28 December 2006 09:08, Peter Danenberg wrote: > I'm running Gnuplot as a web-service, and would like to > castrate its feral shell- and system-facilities; would any- > one mind inspecting the attached patch to command.c for > unintended consequences? The particular code chunk you are eviscerating is only the tip of the iceberg [to mix metaphors hideously]. Shell substitution and file/pipe creation are built into gnuplot in multiple places. Consider statements like set print "/var/www/html/index.html"; print pi Would this trash the main page of your web site? What about plot "/etc/passwd" using 0:(0):1 with labels or plot "< /usr/bin/reboot" I really don't think that gutting gnuplot's internal code is the way to approach this. You should rather look into chroot and other mechanisms of isolating the web server environment itself from the rest of the system. |