in reply to Re: getting root permissions via program
in thread getting root permissions via program

ok, I can go with that. In that case, my question becomes how can I test to see that my program was started via sudo? If I'm not mistaken, sudo does not check UID?
  • Comment on Re^2: getting root permissions via program

Replies are listed 'Best First'.
Re^3: getting root permissions via program
by stiller (Friar) on Feb 25, 2008 at 15:29 UTC
    If your program is owned by root, and only executable by root, then no one will be allowed to run it unless they are root, or use sudo, so you don't really need to check further.