Permissions ( to avoid unwanted things )


 
Thread Tools Search this Thread
Special Forums Cybersecurity Permissions ( to avoid unwanted things )
# 1  
Old 01-16-2009
Permissions ( to avoid unwanted things )

I want to make an automated system to compile & run the source codes from different persons and to tell if the output is the same with the standard one(wich is given by me). Ok, this is quite simple, but the tricky part is,how do I avoid the "bad intentions" that may result from running those compiled sources.(Eg.: a program that should return the sum of two numbers, is designed to halt the sysyem Smilie).Generaly speaking, how do I prevent those programms do things like: network accesing, creating to many child processes (causing a DOS), generating to much output (thus the system remains out of space), using to much memory, calling system functions, etc. How to protect my system from this kind of (posible) abuses ? (I mention that the sources submitted are , for now, c++ sources, but should work for other languages too).

Thanks, Adrian
# 2  
Old 01-16-2009
The simplest way that I can think of is to compile, and then copy the binaries to a virtual machine that you can kill if something is wrong. With a POSIX compatible shell you can additionally set limits (via ulimit(1)) for memory, processes created, open files, ...
# 3  
Old 01-16-2009
Error

Ok, this is a solution, but there may be another better ! I don't want to use an auxiliary machine(vm or computer), I want to check if something's wrong on my machine. There's got to be a solution..


Thanks, Adrian
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to avoid TAR of directory with no permissions?

Hi Users, i have a situation as below; -rw-r--r-- 1 t1elkpe cmptl 0 Mar 18 12:00 file2 ---------- 1 t1elkpe cmptl 0 Mar 14 16:07 file1 d--------- 3 t1elkpe cmptl 3 Mar 18 11:23 fd now when i am tarting the above files below is what i get as... (10 Replies)
Discussion started by: rajangupta2387
10 Replies

2. UNIX for Dummies Questions & Answers

things root can't do

Hey all my co-workers and I are trying to put together a list of things root "Can't" do on any *NIX OS, so I wanted to come here and see what all we could come up with. Here are two to start this off: write to a read only mount FS kill a tape rewind Please add what you know. Thanks,... (5 Replies)
Discussion started by: sunadmn
5 Replies

3. UNIX for Dummies Questions & Answers

Just trying to find out a few things ....

Hi everyone Just a couple of quick questions if I may. Can I ask what is meant by "flavours"?? I've come across it many times in the forums and I'm guessing that it is a variery of either Linux or UNIX (I know nil about either) which has developed but not really got a clue. ... (1 Reply)
Discussion started by: Tiramisu
1 Replies

4. Programming

Question about several things in C

Hey guys, first of all I'd like to say Hi to everyone. I am new here and this is my first post. I have a question about some C stuff. I am in Computer Science and I have an assignment for a UNIX Applications course. It is really complicated, however. We're using the C language for this and... (1 Reply)
Discussion started by: V4D3R
1 Replies

5. Programming

Complicating things?

So basically what im trying to do is ... Open file, read that file, than try to find .. We or we and replace them with I, but not replace the cases where words contain We or we, such as Went, went, etc a and replace them with the, but not replace the cases where words contain a, such as... (1 Reply)
Discussion started by: bconnor
1 Replies

6. Shell Programming and Scripting

how to convert things from csh to sh

i have this method in csh that check for file exist. #check that file exists if ( ! -e $6$5 ) then echo $6$5 Not Found exit 8 endif however i wanted in to be in just sh. so i change the code to: if ; then echo $6$5 Not Found exit 8 fi I get error... (1 Reply)
Discussion started by: forevercalz
1 Replies
Login or Register to Ask a Question