Kill a process in OS X?

Brian Yennie briany at qldlearning.com
Thu Jun 24 16:17:06 EDT 2004


Ken,

You can try using "echo" to pipe along the password. Keep in mind that 
any shell() call which includes your password in clear text is a small 
security hole, as the password will briefly appear in the process list.

echo 'pwdhere' | sudo ...

The best option would probably be to use "open process" and then write 
the password to the process, but last I checked open process was still 
broken. Haven't checked in a while though.

You might also search the archives for sudo and shell(), I seem to 
recall an old thread about this way back when in which someone actually 
pointed out the above security hole to me.

- Brian

> I'm in a situation where there's a process running that I need to kill 
> (OS X
> 10.3). If I do it through the terminal with 'sudo kill -9 <pid>', it 
> asks me
> for the password in the terminal, and after I've entered it, it is 
> killed. I
> need to move that functionality into a Rev stack and sending the 'sudo 
> kill'
> through shell() is a no-brainer, but how to I send the password along 
> with
> it so that it can do everything I was doing in the terminal?
>
> Thanks for anyone's help,
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list