From: Rob H. <for...@us...> - 2004-12-21 06:27:11
|
Update of /cvsroot/sandweb/sandweb/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10516 Modified Files: SandWeb.pm Log Message: remove hardcoded paths. I think we should start passing around a config object, or something, instead of passing just the params that objects need.. it requires us to know way too much about the objects we're creating. Index: SandWeb.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -U2 -r1.30 -r1.31 --- SandWeb.pm 24 Aug 2003 18:43:32 -0000 1.30 +++ SandWeb.pm 21 Dec 2004 06:27:01 -0000 1.31 @@ -140,5 +140,5 @@ my $config = ''; - $return = SandWeb::Config::->new(@_); + $return = SandWeb::Config::->new(@_); if ($return->{'errlev'}) { $config = $return->{'data'}; @@ -149,7 +149,11 @@ my $log = &_load_log_object('config' => $config); my $ui = &_load_ui_object('config' => $config, 'log' => $log); - my $auth = &_load_auth_object('config' => $config, 'log' => $log); + my $auth = &_load_auth_object( + 'config' => $config, + 'log' => $log, + 'bindir' => $return->{'bindir'}, + 'ssh_bin' => $return->{'ssh_bin'}); # create new conf object with log functionality - $return = SandWeb::Config::->new(@_, 'log_obj' => $log); + $return = SandWeb::Config::->new(@_, 'log_obj' => $log); if ($return->{'errlev'}) { $config = $return->{'data'}; @@ -214,6 +218,10 @@ my $config = $args{'config'}; my $log = $args{'log'}; + my $bindir = $args{'bindir'}; + my $ssh_bin = $args{'ssh_bin'}; my $auth = SandWeb::Auth::->new( 'log_obj' => $log, + 'bindir' => $bindir, + 'ssh_bin' => $ssh_bin, 'users_dir' => $config->{'paths'}->{'users_dir'}, 'data_dir' => $config->{'paths'}->{'data_dir'}, |