-@EXPORT_OK = qw(checkeuid checkruid swapuid cgisuidsetup
- adminsuidsetup getotaker dbh datasrc getsecrets driver_name );
+@EXPORT_OK = qw(checkeuid checkruid cgisuidsetup adminsuidsetup forksuidsetup
+ getotaker dbh datasrc getsecrets driver_name );
$dbh = DBI->connect($datasrc,$db_user,$db_pass, {
'AutoCommit' => 0,
$dbh = DBI->connect($datasrc,$db_user,$db_pass, {
'AutoCommit' => 0,
$user = lc ( $cgi->connection->user );
} else {
die "fatal: Can't get REMOTE_USER! for cgi $cgi - you need to setup ".
$user = lc ( $cgi->connection->user );
} else {
die "fatal: Can't get REMOTE_USER! for cgi $cgi - you need to setup ".
=item getsecrets [ USER ]
Sets the user to USER, if supplied.
=item getsecrets [ USER ]
Sets the user to USER, if supplied.
die "No user!" unless $user;
my($conf) = new FS::Conf $conf_dir;
my($line) = grep /^\s*$user\s/, $conf->config('mapsecrets');
die "No user!" unless $user;
my($conf) = new FS::Conf $conf_dir;
my($line) = grep /^\s*$user\s/, $conf->config('mapsecrets');