I'm writing an application which has, among other things, web-based administration. The admin panel has to store configuration variables, and I need a generic interface for this so it's easily updatable. It should also fulfil the following conditions:
1) Works on NT as well as Unixen
2) Works for unprivileged users on a server
3) Secure!
At first I was going to use Data::Dumper and dump config variables to a perl file which could then be "require"d by the main application. But because the admin is web-based, this would mean either having a world-writable file to be required (breaks (3) badly!) or having a setuid script (dangerous, may be disallowed on many servers, kernel problems).
Now I am thinking, a DBM file. But I don't know if this will work on NT. And presumably we still either need a world-writable DBM file, or a setuid script.
Has anyone got any useful alternatives? Is there a secure way of dumping data to be "require"d or read in later?
Cheers
David
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.