[fpc-pascal] su (switch user) application
Michael Van Canneyt
michael at freepascal.org
Mon Aug 7 17:31:06 CEST 2006
On Mon, 7 Aug 2006, Johannes Nohl wrote:
> Does anyone know how to write a program which can change its user
> privileges on runtime? Like the suexec wrapper of apache?
>
> Thanks for help...
This is not possible unless it runs as root.
(which can be forced by setting the executable file setuid root)
In that case you can use the fpSetUID call.
This call can be used only once.
Michael.
More information about the fpc-pascal
mailing list