NAME
Paranoid - Paranoia support for safer programs
MODULE VERSION
$Id: Paranoid.pm,v 0.16 2008/02/27 17:56:12 acorliss Exp $
SYNOPSIS
use Paranoid;
$errMsg = Paranoid::ERROR;
psecureEnv("/bin:/usr/bin");
REQUIREMENTS
None.
DESCRIPTION
This collection of modules started out as modules which perform things (debatably) in a safer and taint-safe manner. Since then it's also grown to include functionality that fit into the same framework and conventions of the original modules, including keeping the debug hooks for command-line debugging.
All the modules below are intended to be used directly in your programs if you need the functionality they provide.
This module does provide one function meant to secure your environment enough to satisfy taint-enabled programs, and as a container which holds the last reported error from any code in the Paranoid framework.
NOTE: at one point this module enforced use of taint mode in all scripts using it. I no longer do that because I want to use this in other modules that never required that constraint, and I don't want to piss off too many users right off the bat. That being said: ALWAYS USE TAINT MODE IF YOU CAN.
CHILD MODULES
The following modules are available for use. You should check their POD for specifics on use:
Paranoid::BerkeleyDB
Paranoid::Debug
Paranoid::Filesystems
Paranoid::Input
Paranoid::Lockfile
Paranoid::Log
Paranoid::Module
Paranoid::Network
Paranoid::Process
FUNCTIONS
psecureEnv
psecureEnv("/bin:/usr/bin");
This function deletes some of the dangerous environment variables that can be used to subvert perl when being run in setuid applications. It also sets the path, either to the passed argument (if passed) or a default of "/bin:/usr/bin".
Paranoid::ERROR
This lvalue function is not exported and must be referenced via the Paranoid namespace.
HISTORY
None as of yet.
AUTHOR/COPYRIGHT
(c) 2005 Arthur Corliss (corliss@digitalmages.com)