summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2006-07-14 01:42:42 +0000
committerivan <ivan>2006-07-14 01:42:42 +0000
commit22beb7aa1be0c71984c87fed7982299c315ce254 (patch)
treec8ba87a2292ede7368302db9e95adb122deceb49 /FS
parent484fa24446f613b3371770fb3c3212fd115154f1 (diff)
add the small FS::CurrentUser::BootstrapUser class for... surprise... bootstrapping
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/CurrentUser.pm15
-rw-r--r--FS/FS/UID.pm2
2 files changed, 15 insertions, 2 deletions
diff --git a/FS/FS/CurrentUser.pm b/FS/FS/CurrentUser.pm
index 37ed359..a2dfd71 100644
--- a/FS/FS/CurrentUser.pm
+++ b/FS/FS/CurrentUser.pm
@@ -21,7 +21,9 @@ FS::CurrentUser - Package representing the current user
sub load_user {
my( $class, $user ) = @_; #, $pass
- return "" if $upgrade_hack;
+ if ( $upgrade_hack ) {
+ return new FS::CurrentUser::BootstrapUser;
+ }
#return "" if $user =~ /^fs_(queue|selfservice)$/;
@@ -49,5 +51,16 @@ Creepy crawlies
=cut
+package FS::CurrentUser::BootstrapUser;
+
+sub new {
+ my $proto = shift;
+ my $class = ref($proto) || $proto;
+ my $self = {};
+ bless ($self, $class);
+}
+
+sub AUTOLOAD { 1 };
+
1;
diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm
index 1f51ca6..0d32002 100644
--- a/FS/FS/UID.pm
+++ b/FS/FS/UID.pm
@@ -74,7 +74,7 @@ sub forksuidsetup {
$user = shift;
if ( $FS::CurrentUser::upgrade_hack ) {
- $user = '';
+ $user = 'fs_bootstrap';
} else {
croak "fatal: adminsuidsetup called without arguements" unless $user;