From 5786c8244a188823b01b87e2d7e9fd6bc72644b3 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 3 Jul 2002 11:23:25 +0000 Subject: [PATCH 1/1] fix to allow running during apache init --- FS/FS/InitHandler.pm | 7 +++++++ FS/FS/UID.pm | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/FS/FS/InitHandler.pm b/FS/FS/InitHandler.pm index b1b9eaf03..31aacc731 100644 --- a/FS/FS/InitHandler.pm +++ b/FS/FS/InitHandler.pm @@ -64,6 +64,9 @@ sub handler { warn "[FS::InitHandler] handler called\n" if $DEBUG; + #this is sure to be broken on freebsd + $> = $FS::UID::freeside_uid; + open(MAPSECRETS,"<$FS::UID::conf_dir/mapsecrets") or die "can't read $FS::UID::conf_dir/mapsecrets: $!"; @@ -80,6 +83,10 @@ sub handler { close MAPSECRETS; + #lalala probably broken on freebsd + ($<, $>) = ($>, $<); + $< = 0; + } 1; diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm index 15f15a171..0b10612c5 100644 --- a/FS/FS/UID.pm +++ b/FS/FS/UID.pm @@ -83,7 +83,7 @@ sub forksuidsetup { $ENV{'ENV'} = ''; $ENV{'BASH_ENV'} = ''; - croak "Not running uid freeside!" unless checkeuid() || !$>; + croak "Not running uid freeside!" unless checkeuid(); getsecrets; $dbh = DBI->connect($datasrc,$db_user,$db_pass, { 'AutoCommit' => 0, @@ -256,7 +256,7 @@ coderef into the hash %FS::UID::callback : =head1 VERSION -$Id: UID.pm,v 1.17 2002-07-03 11:10:12 ivan Exp $ +$Id: UID.pm,v 1.18 2002-07-03 11:23:25 ivan Exp $ =head1 BUGS -- 2.11.0