Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread Pete Cervasio
On Wednesday 11 October 2006 20:44, Michalis Kamburelis wrote: > Pete Cervasio wrote: > > The better way would be to use the geteuid function in the libc unit, > > It would be even better to use FpGetEUid function from the BaseUnix > unit. See > [http://www.freepascal.org/docs-html/rtl/baseunix/fpg

Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread Michalis Kamburelis
Pete Cervasio wrote: > On Wednesday 11 October 2006 19:37, Andrew Haines wrote: >> TOUZEAU DAVID wrote: >>> Dear >>> >>> I need to detect if the program is executed as root privileges on Linux >>> system. >>> Did somebody had developped a such function ?? >>> >>> Best regards. >> Well you can try G

Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread Pete Cervasio
On Wednesday 11 October 2006 19:37, Andrew Haines wrote: > TOUZEAU DAVID wrote: > > Dear > > > > I need to detect if the program is executed as root privileges on Linux > > system. > > Did somebody had developped a such function ?? > > > > Best regards. > > Well you can try GetEnv('USER') = 'root';

Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread Andrew Haines
TOUZEAU DAVID wrote: > Dear > > I need to detect if the program is executed as root privileges on Linux > system. > Did somebody had developped a such function ?? > > Best regards. > > Well you can try GetEnv('USER') = 'root'; or GetEnv('UID') = '0'; but there may be better ways to check this.

[fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread TOUZEAU DAVID
Dear I need to detect if the program is executed as root privileges on Linux system. Did somebody had developped a such function ?? Best regards. -- David Touzeau -- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849

[fpc-pascal] Using FPC as a scripting engine

2006-10-11 Thread Alexander Todorov
Hello list, currently I am using RemObjects Pascal Script as a scripting language for a project of mine. All scripts are simple programs that use "API" exported from the main program. They have and some global variables defined as well. example: begin Context.ShowMessage(Params.Param('message')

Re: [fpc-pascal] [CRYPT]: Is there an unit to perform crypt/decrypt on Linux ?

2006-10-11 Thread TOUZEAU DAVID
Many Thanks vincent exactly what i want to find !!! Vincent Snijders a écrit : TOUZEAU DAVID schreef: Dear I would like to crypt some files/strings/datas with fpc on Linux systems. What unit can i use to provide this feature ? I there a standard unit or somebody had already developped a such

Re: [fpc-pascal] [CRYPT]: Is there an unit to perform crypt/decrypt on Linux ?

2006-10-11 Thread Michael Van Canneyt
On Wed, 11 Oct 2006, TOUZEAU DAVID wrote: > Dear > > I would like to crypt some files/strings/datas with fpc on Linux systems. > What unit can i use to provide this feature ? > I there a standard unit or somebody had already developped a such unit ? Look at the idea or blowfish units in the FC

Re: [fpc-pascal] [CRYPT]: Is there an unit to perform crypt/decrypt on Linux ?

2006-10-11 Thread Vincent Snijders
TOUZEAU DAVID schreef: Dear I would like to crypt some files/strings/datas with fpc on Linux systems. What unit can i use to provide this feature ? I there a standard unit or somebody had already developped a such unit ? Maybe you can use this: http://wiki.lazarus.freepascal.org/DCPcrypt Vin

[fpc-pascal] [CRYPT]: Is there an unit to perform crypt/decrypt on Linux ?

2006-10-11 Thread TOUZEAU DAVID
Dear I would like to crypt some files/strings/datas with fpc on Linux systems. What unit can i use to provide this feature ? I there a standard unit or somebody had already developped a such unit ? -- David Touzeau -- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delp