Hi,

In my program I have some functions that must only be enabled if the
program is invoked as root (linux) / administrator (windows).

Is there some cross platform way to detect this?

I thought of trying to write to a "protected" location (/etc/something
on linux, C:\ProgramData\something on Windows), but the problem is
that Windows virtualizes these calls (it'll end up somewhere lse,
where your program will never find it again), so writing will succeed
even if user has no administrator rights.

Bart
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to