Re: [Q] : policy to run external commands



On Sat, Sep 08, 2001 at 02:15:22PM +0200, Emmanuel wrote:
> 	Hi all,
> I want to be able to call a user defined external command on each message
> that a filter matches. I plan to use gnome_execute_shell function but :
> 

eek :)

> 	what are the security issue I have to keep in mind, ie how to be as
> safe as possible,
> 	
just don't run anything that ends in .vbs ;)

now serious, i don't like the idea of balsa running commands automatically
on incoming messages.

> 	and I want to be able to feed the command with certain parts of the
> matching message (header fields, even body in one or another form), so what
> would you want to see there : fork one command per matching message (using
> command line to pass header fiels, but not the body) or fork one command
> for all matching messages and create a thread that feed the command with
> messages part (here there are locking issue because if the command is long
> enough, I don't want that someone can delete/move a message the feeding
> thread will reference later leading to a crash).
> 

what command do you have in mind ? something that doesn't fit into
gnome-mime/gnome-vfs ? whatever the user wants ?

suficient referincing of messages will garantee you nothing nasty happens
either way.
i'm really alloss about the main idea here but forking one command per
message could get nasty. you'd need some kind of serialization mechanism to 
avoid having oh ... 1000 processes spawned at once.

possible scenarios you have in mind ?

cheers

-- 
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A 
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
UNIX is user friendly. It's just very carefull choosing his friends.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]