Because of security, my Perl will be ran has root so I'm using
C to put a security blanket around it. In the perl script of change to the Effective UID which is root. | [reply] |
Either use the setuid function of POSIX, or else study perlvar for $< and $>, which can be used to change the real and effective UIDs in Perl itself, eliminating the need for a C wrapper.
Even if it didn't have that built in, you could plan on using Inline::C to get access to useful C functionality directly in Perl.
Remember that Perl has had a long life as a system administration tool on *nix, so you should expect that it has features which are useful for that, you just have to look for them.
| [reply] |