[Gambas-user] su command
Demosthenes Koptsis
demosthenesk at ...626...
Thu Apr 10 19:15:04 CEST 2008
Hi to all,
i have a form with a button named Button1.
The following code runs ok with gambas2-2.5.0 on Suse 10.2 but fails
on Mandriva and PC Linux OS (Mandriva based distros).
I just mention it cause may be it's a bug.
Do you know anything about it?
----------------------------------------------------------
' Gambas class file
PUBLIC SUB Button1_Click()
'in order to run a su command we create a temp file named tmpFile0
in /tmp directory
'with the root password writed in it.
'Make sure that the file contains only root password without new
line characters or spaces.
'local variable varCommand makes a string command
DIM varCommand AS String
'here we feed the input with the content of the temp file and we
send errors to /dev/null
varCommand = "su -c \"mkdir /mnt/mydir\" 0</tmp/tmpFile0 2>/dev/null"
SHELL varCommand
END
----------------------------------------------------------
i send my test app to check out
--
Γεια χαρα σε όλους!!!
Regards,
Demosthenes Koptsis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tests.rar
Type: application/x-rar-compressed
Size: 15292 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080410/7c562344/attachment.bin>
More information about the User
mailing list