Stefano Palmeri ha scritto:
> Hi, Benoit. Hi all.
>
> I've a little problem here. I can't feed the root password
> to a "su -c" process invocation. I've attached a little example.
> In a form there's a textbox. You type the root password,
> then you press 'Confirm' and you should be able to execute
> su -c 'cat /etc/sudoers'. But I can't.
> Any help appreciated. Thanks.
>   
Try using "FOR INPUT OUTPUT" instead of "FOR READ WRITE".

There has been some time ago a discussion on this forum about this 
difference. READ+WRITE is buffered, while INPUT+OUTPUT is not; perhaps, 
what happens is that you write on process stdin, but data never reaches 
it because it waits to fill up its buffer. Using INPUT OUTPUT should not 
try to fill the buffer, but pass the data as soon as it arrives.
See the docs for (few) more details.

Regards,
Doriano.



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to