Andrew Brunner wrote:
I'm needing help to take my Lazarus app, elevate process to root
(using GUI prompt like GKSU) and I want to drop back down to the
user's level after port binding and listening.
Ubuntu has port restrictions for low port numbers. I'm developing a
platform that happens to use ports for HTTP, XMPP, etc. Unfortunately
I find myself running Lazarus as root and that is messing up my units
as they are saved.
Could you suid it to root or to an appropriate group? I've not tried
this for a Pascal/Lazarus program and don't know what the precise rules
are for port usage (i.e. whether the user has to be root or using the
root group is sufficient), but for a C program accessing a video capture
device I use
chown root:video v4lgrab
chmod g+s v4lgrab
That then allows the program to be run as part of an unprivileged CGI
script.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal