| Tom Phoenix 2006-10-23, 9:57 pm |
| On 10/23/06, Michael Gale <michael.gale@pason.com> wrote:
> Is there a way that perl can load a module as root ? or somehow sudo
> with in it self to use the module ?
Not like you're thinking. Sorry.
One way around the problem is to make a privileged daemon which can
update the tables (or whatever is needed), and a non-privileged
program which can tell the daemon what to do.
Of course, when anything is running as root, the usual warnings about
security risks apply. And you'll need a way to ensure that the daemon
does the right thing, even if a (malicious?) user wants to tell it
otherwise.
It doesn't have to be a daemon, in fact; an ordinary set-id program
may be enough, especially if the requests are infrequent. But the same
security worries apply.
Good luck with it!
--Tom Phoenix
Stonehenge Perl Training
|