This all seems very complex and not portable -- not everyone has proc.

Why are you hiding your usernames/passwords anyway? The only time this may be required is when you are sharing a server with other people. If security is a concern you will probably be using a dedicated server anyway.

If you have a lot of users, then file system permissions should be enough anyway -- only the uid your cgi scripts execute under should have read permissions to this file. Your password files should not be in the web root.

Why not put these in the environment, then you can use %ENV to get at them. Then your passwords are stored only in your webserver config files. btw, this doesn't scale if you have more than one database.

When it comes down to it, shouldn't you have your database server only configured to accept connections from your webserver anyhow?

Just some thoughts.


In reply to Re: DSN Wrapper for Secure DBI Passwords by DrZaius
in thread Reaped: DSN Wrapper for Secure DBI Passwords by NodeReaper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.