projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
show the euid/ruid when throwing the "Not running uid freeside" error
[freeside.git]
/
FS
/
FS
/
UID.pm
diff --git
a/FS/FS/UID.pm
b/FS/FS/UID.pm
index
bd2b70d
..
a6b4c4b
100644
(file)
--- a/
FS/FS/UID.pm
+++ b/
FS/FS/UID.pm
@@
-3,7
+3,7
@@
package FS::UID;
use strict;
use vars qw(
@ISA @EXPORT_OK $DEBUG $me $cgi $dbh $freeside_uid $user
use strict;
use vars qw(
@ISA @EXPORT_OK $DEBUG $me $cgi $dbh $freeside_uid $user
- $conf_dir $secrets $datasrc $db_user $db_pass %callback @callback
+ $conf_dir $
cache_dir $
secrets $datasrc $db_user $db_pass %callback @callback
$driver_name $AutoCommit $callback_hack $use_confcompat
);
use subs qw(
$driver_name $AutoCommit $callback_hack $use_confcompat
);
use subs qw(
@@
-25,7
+25,8
@@
$me = '[FS::UID]';
$freeside_uid = scalar(getpwnam('freeside'));
$freeside_uid = scalar(getpwnam('freeside'));
-$conf_dir = "%%%FREESIDE_CONF%%%";
+$conf_dir = "%%%FREESIDE_CONF%%%";
+$cache_dir = "%%%FREESIDE_CACHE%%%";
$AutoCommit = 1; #ours, not DBI
$use_confcompat = 1;
$AutoCommit = 1; #ours, not DBI
$use_confcompat = 1;
@@
-97,7
+98,7
@@
sub forksuidsetup {
$ENV{'ENV'} = '';
$ENV{'BASH_ENV'} = '';
$ENV{'ENV'} = '';
$ENV{'BASH_ENV'} = '';
- croak "Not running uid freeside
!
" unless checkeuid();
+ croak "Not running uid freeside
(\$>=$>, \$<=$<)\n
" unless checkeuid();
warn "$me forksuidsetup connecting to database\n" if $DEBUG;
if ( $FS::CurrentUser::upgrade_hack && $olduser ) {
warn "$me forksuidsetup connecting to database\n" if $DEBUG;
if ( $FS::CurrentUser::upgrade_hack && $olduser ) {
@@
-114,10
+115,10
@@
sub forksuidsetup {
warn "$me forksuidsetup deciding upon config system to use\n" if $DEBUG;
warn "$me forksuidsetup deciding upon config system to use\n" if $DEBUG;
- if ( dbdef->table('conf') ) {
+ if (
! $FS::Schema::setup_hack &&
dbdef->table('conf') ) {
my $sth = $dbh->prepare("SELECT COUNT(*) FROM conf") or die $dbh->errstr;
my $sth = $dbh->prepare("SELECT COUNT(*) FROM conf") or die $dbh->errstr;
- $sth->execute or die $sth->errstr;
+ $sth->execute or die $sth->errstr;
my $confcount = $sth->fetchrow_arrayref->[0];
if ($confcount) {
my $confcount = $sth->fetchrow_arrayref->[0];
if ($confcount) {