I'm sorry to ask such a question inside lkml but I'm in a student in an
engineering school and we have a very strange project to realize.
We must choose an OS (Linux is the winner !) and add some functionnalities
in the kernel to create a new kind of links !
The teacher want to add a link which can be created like this :
ln -s '`echo $HOME`' mbin
When you enter mbin, the kernel must start a shell (!!) to execute the
script shell contained in the link (ie executes "echo $HOME"). This is a
dangerous idea because you can put "rm -rf /" instead of a banal echo...
But it's not my choice !
The main difficulties are (for both the students) to start a process for and
In fact, you must evaluate "echo $HOME" and to substitute it with the
result. In this example, it's just an echo but it could be worst...
I have looked at do_execve, sys_execve and do_fork but I don't know how I
must fill (or not) struct pt_regs. Fork must be the best choice because
the process must inherit the user rights.
If you can waste time to help us, you are welcome !
-- Mathieu CHOUQUET-STRINGER E-Mail : chouqu_m@epita.fr "Hi! I'm a .signature virus! copy me into your ~/.signature file to help me spread!"- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/