I need to accept job files from users, which would essentially consist of console interaction with a process I will be running for them. Naturally, the first idea that came to mind is to use expect scripts as job files:spawn processexpect readysend process DATAset timeout 100expect {    done {send_user success}    timeout {send_user failure}}However, since I'd like to accept jobs automatically, I want to prevent users from doing something stupid or dangerous, like spawning 10 sysbench processes, or writing random files to the disk, or trying to read /etc/passwd. I want to restrict them to STDIN/STDOUT interactions with the process I spawn for them.How would I go about this? So far my thoughts are:write my own expect lite. Sounds feasible but silly and time-consuming.sanitize expect job files. Sounds complex and error-prone.invent my own safe language and translate it to expect. Feasible, but I'll have to provide documentation and tutorials so users can learn it.restrict job process with quota and permissions. Not really an option, since I want my process to use a fair amount of CPU time and create tmp files (which I'm confident it will clean up).give users interactive access to process. Not an option since jobs may have to sit in a queue for some time.Is there something obvious I'm missing, like expect configuration parameter which restricts the scripts, or a similar tool I could use instead?
Restrict `expect` to stdin/stdout interaction only
scripting;security;expect