Or make a small helper utility which does the bare minimum of work that requires elevated privileges and run that via sudo. But seconded; you really don't want to try and do it yourself if you can get away with off the shellf. Just let sudo do the heavy lifting for you (something that's its specialized in; not to mention it's high profile and will have way more eyeballs scrutinizing it than your code would).
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re^2: getting root permissions via program
by Fletch
in thread getting root permissions via program
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |