[fpc-pascal]port access as simple user

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Jul 29 14:37:16 CEST 2003

On Tue, 29 Jul 2003, [iso-8859-2] Balázs Csaba wrote:

> Hi!
> I like to access ports as a simple user. Only root user can do it.
> So i like to run a program with root user and first fork or execve to the
> same program with setuid(). So how can i run a program with root user whene
> i logged in with a simple one? Can i fork port access rights?

You must make your program "setuid root".

i.e. compile and install as root, and then run
"chmod 4755 yourprogram"

The program will then be run with root permissions.


More information about the fpc-pascal mailing list