Time ago i had this answer but i cannot recall how exactly was the syntax. I have two files. One is binary file called "changeuid" and second is "do.sh". I need to run changeuid which will change my uid and after execution, content of do.sh, which consist of list of commands available only for uid given by changeuid script, to be executed. What i dont remember is how this was done. Ive been testing few variants none worked or maybe tasks inside them which werent similar to what original ones do were wrong. So .. might be:
./changeuid < sh do.sh
./changeuid < . do.sh
./changeuid < source do.sh
source do.sh < ./changeuid
sh do.sh < ./changeuid
Solution? Thx in advance.