I've written a module that I've given the temporary name Process::DropPrivs. It's for dropping root privileges and making sure they really did get dropped. This is useful in a script that might start up as root, open up a log file in /var/log, switch to the 'nobody' user id, and then do something as nobody. This is one of those tasks that looks simple but is easy to get wrong. The module has one function, which I currenly call drop_privs(), and it changes the current process's uid, euid, gid, egid & supplimental gids. For example, 'root' might be a member of the 'root','wheel','tape' and 'bin' groups. When you switch to the 'nobody' user you want to make sure you didn't stay a member of the 'wheel' group.
So, a module that does that is what I'm looking for a name for.
Other ideas I've had are:
Privileges::Drop
Process::DropPrivileges
UserID::Switch
ChangeUser
etc...
Thanks!
-Pileofrogs
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.