Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2032 > unrolled thread
| Started by | lukas.havrlant@gmail.com |
|---|---|
| First post | 2013-09-14 01:52 -0700 |
| Last post | 2013-10-11 14:52 -0700 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Is it safe to run an arbitrary gnuplot command on a server? lukas.havrlant@gmail.com - 2013-09-14 01:52 -0700
Re: Is it safe to run an arbitrary gnuplot command on a server? Karl <mail.kfr@gmx.net> - 2013-09-14 16:13 +0200
Re: Is it safe to run an arbitrary gnuplot command on a server? Bret Foreman <bret.foreman@gmail.com> - 2013-10-11 14:52 -0700
| From | lukas.havrlant@gmail.com |
|---|---|
| Date | 2013-09-14 01:52 -0700 |
| Subject | Is it safe to run an arbitrary gnuplot command on a server? |
| Message-ID | <506c1929-1414-4ccf-98c3-b04cff231381@googlegroups.com> |
Hello, I’d like to have gnuplot on my web forum, so users can in their posts write something like Look at this nice curve! [gnuplot] set key right nobox set samples 100 plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) [/gnuplot] and gnuplot on the server will generate the image. Is it safe? I don’t know gnuplot very much, there may be commands that can damage the server in some way. What should I be aware of?
[toc] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2013-09-14 16:13 +0200 |
| Message-ID | <l11qus$gmk$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2032 |
Am 14.09.2013 10:52, schrieb lukas.havrlant@gmail.com: > Hello, > I’d like to have gnuplot on my web forum, so users can in their posts write something like > > Look at this nice curve! > [gnuplot] > set key right nobox > set samples 100 > plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) > [/gnuplot] > > and gnuplot on the server will generate the image. Is it safe? I don’t know gnuplot very much, there may be commands that can damage the server in some way. What should I be aware of? > gnuplot can run any shell command via "system". That would be safe as long as the account under which gnuplot is run on your server cannot do anything harmful when given access to a console. Otherwise there might be undiscovered bugs in gnuplot that can crash the machine or even allow the user to gain priviliges. As gp is normally only run by at least somewhat "trustworthy" local users, there´s probably noone actively searching for such bugs. And you have to keep in mind that gnuplot can produce a very high load on a machine, both with sensible work (fitting larger datasets or so) and by misuse (try plotting anything after "set sample 1e6"). So i´d rather recommend against it. ymmv ;-) Karl
[toc] | [prev] | [next] | [standalone]
| From | Bret Foreman <bret.foreman@gmail.com> |
|---|---|
| Date | 2013-10-11 14:52 -0700 |
| Message-ID | <b9d59ed9-116e-4c1b-a75f-f9da266bed6a@googlegroups.com> |
| In reply to | #2032 |
I think the safest way to do this is with VMWare. You can run gnuplot in its own virtual machine with privileges reduced to an appropriate level. You can also use tools in VMWare to constrain how much CPU bandwidth gnuplot uses or to constrain it to just one CPU core.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web