Disable the command system



On Thu, 2011-03-10 at 08:21 +0100, Jos? Manuel Mira wrote:
> I have the project to put maxima on my page in order to my students use 
> it from a web interface. But, I need to disable the command system of 
> maxima, which gives access to execute commands in the system. I have not 
> found documentation on the subject.
> 
> Any suggestions?

Hi,
here is a suggestion:

(%i1) system("date");
Thu Mar 10 08:50:33 WET 2011
(%o1)               #<PROCESS :EXITED 0>
(%i2) system([a]):=print("Hola!");
define: warning: redefining the built-in function system
(%o2)          system([a]) := print("Hello!")
(%i3) system("date");
Hola! 
(%o3)                      Hello!

If you put that definition in the system's maxima-init.mac file, it
will be active in every session. Even safer, you could also remove the
definition of system from the source code and recompile Maxima. 
In any case, I advise you to put your Maxima inside a "chroot"
environment, which are easy to set up in Debian.

Cheers,
Jaime