fix to allow running during apache init
[freeside.git] / FS / FS / InitHandler.pm
index b1b9eaf..31aacc7 100644 (file)
@@ -64,6 +64,9 @@ sub handler {
 
   warn "[FS::InitHandler] handler called\n" if $DEBUG;
 
 
   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: $!";
 
   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;
 
 
   close MAPSECRETS;
 
+  #lalala probably broken on freebsd
+  ($<, $>) = ($>, $<);
+  $< = 0;
+
 }
 
 1;
 }
 
 1;