You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(28) |
Nov
(58) |
Dec
(85) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(222) |
Mar
(274) |
Apr
(51) |
May
(22) |
Jun
(50) |
Jul
(15) |
Aug
(33) |
Sep
(11) |
Oct
(29) |
Nov
(17) |
Dec
(1) |
2003 |
Jan
(100) |
Feb
(21) |
Mar
(7) |
Apr
(45) |
May
|
Jun
(43) |
Jul
(27) |
Aug
(24) |
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
(1) |
Feb
|
Mar
(13) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Rob H. <for...@us...> - 2002-04-04 19:27:45
|
Update of /cvsroot/sandweb/sandweb/doc/pod In directory usw-pr-cvs1:/tmp/cvs-serv10509 Removed Files: CHANGES.pod INSTALL.pod PODmaster.pod README.pod admin_guide.pod history.pod security_guide.pod user_guide.pod Log Message: hmm, these haven't been touched since the import from CVSWebClient. In fact, some of them still say "CVSWebClient" in them :) Removing for now. If anyone wants them, feel free to resurrect them. --- CHANGES.pod DELETED --- --- INSTALL.pod DELETED --- --- PODmaster.pod DELETED --- --- README.pod DELETED --- --- admin_guide.pod DELETED --- --- history.pod DELETED --- --- security_guide.pod DELETED --- --- user_guide.pod DELETED --- |
From: Rob H. <for...@us...> - 2002-04-04 19:26:29
|
Update of /cvsroot/sandweb/sandweb/doc In directory usw-pr-cvs1:/tmp/cvs-serv10194 Modified Files: auth-spec.txt dependencies.list Log Message: bringing docs up-to-date Index: auth-spec.txt =================================================================== RCS file: /cvsroot/sandweb/sandweb/doc/auth-spec.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -U2 -r1.1.1.1 -r1.2 --- auth-spec.txt 2 May 2001 22:04:11 -0000 1.1.1.1 +++ auth-spec.txt 4 Apr 2002 19:26:23 -0000 1.2 @@ -8,8 +8,8 @@ versa. -In order for UNIX authentication to work, there must be -a login/authentication script that can run SUID. It will -then do a POSIX setuid() to the user that has logged in -through the web interface. +The "su" command can be used to change UID, as long as +we have the correct username/password. -This should be done using the "suidperl" binary. +Commands can be executed as a specific UID like this : + +su - username -c "command" Index: dependencies.list =================================================================== RCS file: /cvsroot/sandweb/sandweb/doc/dependencies.list,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- dependencies.list 30 Jan 2002 05:10:38 -0000 1.3 +++ dependencies.list 4 Apr 2002 19:26:23 -0000 1.4 @@ -2,4 +2,5 @@ * perl 5.6 +* expect 5.28.1+ perl modules: @@ -8,3 +9,2 @@ * XML::Simple (v1.05+) * HTML::Template (v2.2+) - |
From: Rob H. <ro...@na...> - 2002-04-03 21:19:55
|
dee-yam, this is from Monday and I just got it now. weird. ----- Forwarded message from Rob Helmer <for...@us...> ----- To: san...@li... From: Rob Helmer <for...@us...> Subject: [Sandweb-commit] CVS: sandweb/lib/SandWeb Shell.pm,1.1,1.2 Errors-To: san...@li... X-BeenThere: san...@li... X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: <mailto:san...@li...?subject=help> List-Post: <mailto:san...@li...> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/sandweb-commit>, <mailto:san...@li...?subject=subscribe> List-Id: <sandweb-commit.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/sandweb-commit>, <mailto:san...@li...?subject=unsubscribe> List-Archive: <http://www.geocrawler.com/redir-sf.php3?list=sandweb-commit> X-Original-Date: Mon, 01 Apr 2002 19:45:43 -0800 Date: Mon, 01 Apr 2002 19:45:43 -0800 Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv2210/lib/SandWeb Modified Files: Shell.pm Log Message: * no longer prints user's SSH password. Oh happy day :) Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- Shell.pm 2 Apr 2002 02:54:43 -0000 1.1 +++ Shell.pm 2 Apr 2002 03:45:41 -0000 1.2 @@ -56,10 +56,19 @@ if ( $system_username && $system_password ) { if ( $vcs_username && $vcs_password ) { - $output = `$sandweb_expect unix_vcs $system_username $system_password $vcs_password $command`; + my @raw_output = split('\n', `$sandweb_expect unix_vcs $system_username $system_password $vcs_password $command`); + shift @raw_output; + shift @raw_output; + $output = join('', @raw_output); } else { - $output = `$sandweb_expect unix $system_username $system_password $command`; + my @raw_output = split('\n', `$sandweb_expect unix $system_username $system_password $command`); + shift @raw_output; + shift @raw_output; + $output = join('', @raw_output); } } elsif ( $vcs_username && $vcs_password ) { - $output = `$sandweb_expect vcs $vcs_password "$command"`; + my @raw_output = split('\n', `$sandweb_expect vcs $vcs_password "$command"`); + shift @raw_output; + shift @raw_output; + $output = join('', @raw_output); } else { $output = `$command`; _______________________________________________ Sandweb-commit mailing list San...@li... https://lists.sourceforge.net/lists/listinfo/sandweb-commit ----- End forwarded message ----- |
From: Rob H. <for...@us...> - 2002-04-02 07:43:39
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv17867/bin Modified Files: sandweb.cgi Log Message: arg, password isn't getting set in .user.cfg, getting close though ( at least it's making an entry now :P ) i'll look at this some more tomorrow Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.281 retrieving revision 1.282 diff -U2 -r1.281 -r1.282 --- sandweb.cgi 2 Apr 2002 07:25:32 -0000 1.281 +++ sandweb.cgi 2 Apr 2002 07:43:34 -0000 1.282 @@ -134,4 +134,5 @@ my $repo_server = CGI::param('repo_server') || ''; my $repo_username = CGI::param('repo_username') || ''; + my $repo_password = CGI::param('repo_password') || ''; my $repo_type = CGI::param('repo_type') || ''; my $repo_connection = CGI::param('repo_connection') || ''; @@ -799,5 +800,5 @@ my $repo_server = $args{'repo_server'}; my $repo_username = $args{'repo_username'}; - my $repo_password = $user->get_repo_password(repo => $repo_name); + my $repo_password = $args{'repo_password'}; my $repo_type = $args{'repo_type'}; my $repo_connection = $args{'repo_connection'}; |
From: Rob H. <for...@us...> - 2002-04-02 07:30:57
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv14838/lib/SandWeb Modified Files: Config.pm Log Message: * fixed typo i made Index: Config.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Config.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -U2 -r1.28 -r1.29 --- Config.pm 2 Apr 2002 07:25:33 -0000 1.28 +++ Config.pm 2 Apr 2002 07:30:52 -0000 1.29 @@ -269,4 +269,17 @@ } } +sub set_repo_username { + my $self = shift; + my %args = @_; + my $repo_name = $args{'repo'}; + my $repo_server = $args{'value'}; + if ($self->repository_exists(repo => $repo_name)) { + $self->{'repo'}->{$repo_name}->{'username'} = $value || ''; + return 1; + } else { + return 0; + } +} +# get/set repo_password sub get_repo_password { my $self = shift; @@ -279,5 +292,5 @@ } } -sub set_repo_password{ +sub set_repo_password { my $self = shift; my %args = @_; |
From: Rob H. <for...@us...> - 2002-04-02 07:25:39
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv13393/lib/SandWeb Modified Files: Config.pm Log Message: * added password to .user.cfg Index: Config.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Config.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -U2 -r1.27 -r1.28 --- Config.pm 12 Mar 2002 04:34:05 -0000 1.27 +++ Config.pm 2 Apr 2002 07:25:33 -0000 1.28 @@ -183,4 +183,5 @@ my $server = $args{'server'} || ''; my $username = $args{'username'} || ''; + my $password = $args{'password'} || ''; my $connection = $args{'connection'} || ''; my $type = $args{'type'} || ''; @@ -194,4 +195,5 @@ $self->{'repo'}->{$name}->{'server'} = $server; $self->{'repo'}->{$name}->{'username'} = $username; + $self->{'repo'}->{$name}->{'password'} = $password; $self->{'repo'}->{$name}->{'connection'} = $connection; $self->{'repo'}->{$name}->{'type'} = $type; @@ -207,4 +209,5 @@ my $server = $args{'server'} || ''; my $username = $args{'username'} || ''; + my $password = $args{'password'} || ''; my $connection = $args{'connection'} || ''; my $type = $args{'type'} || ''; @@ -215,4 +218,5 @@ $self->{'repo'}->{$name}->{'server'} = $server if ($server); $self->{'repo'}->{$name}->{'username'} = $username if ($username); + $self->{'repo'}->{$name}->{'password'} = $password if ($password); $self->{'repo'}->{$name}->{'connection'} = $connection if ($connection); $self->{'repo'}->{$name}->{'type'} = $type if ($type); @@ -265,5 +269,15 @@ } } -sub set_repo_username { +sub get_repo_password { + my $self = shift; + my %args = @_; + my $repo_name = $args{'repo'}; + if ($self->repository_exists(repo => $repo_name)) { + return $self->{'repo'}->{$repo_name}->{'password'} || '' + } else { + return ''; + } +} +sub set_repo_password{ my $self = shift; my %args = @_; @@ -271,5 +285,5 @@ my $repo_server = $args{'value'}; if ($self->repository_exists(repo => $repo_name)) { - $self->{'repo'}->{$repo_name}->{'username'} = $value || ''; + $self->{'repo'}->{$repo_name}->{'password'} = $value || ''; return 1; } else { |
From: Rob H. <for...@us...> - 2002-04-02 07:25:39
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv13393/bin Modified Files: sandweb.cgi Log Message: * added password to .user.cfg Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.280 retrieving revision 1.281 diff -U2 -r1.280 -r1.281 --- sandweb.cgi 2 Apr 2002 02:53:46 -0000 1.280 +++ sandweb.cgi 2 Apr 2002 07:25:32 -0000 1.281 @@ -83,5 +83,4 @@ my $user_cfg = 'user.cfg'; -my $repo_password = ''; my $system_username = ''; my $system_password = ''; @@ -610,4 +609,5 @@ my $repo_server = $user->get_repo_server(repo => $repo_name); my $repo_username = $user->get_repo_username(repo => $repo_name); + my $repo_password = $user->get_repo_password(repo => $repo_name); my $repo_type = $user->get_repo_type(repo => $repo_name); my $repo_connection = $user->get_repo_connection(repo => $repo_name); @@ -799,4 +799,5 @@ my $repo_server = $args{'repo_server'}; my $repo_username = $args{'repo_username'}; + my $repo_password = $user->get_repo_password(repo => $repo_name); my $repo_type = $args{'repo_type'}; my $repo_connection = $args{'repo_connection'}; @@ -851,4 +852,6 @@ $repo_username = $user->get_repo_username(repo => $repo_name); + my $repo_password = + $user->get_repo_password(repo => $repo_name); $repo_connection = $user->get_repo_connection(repo => $repo_name); @@ -1859,4 +1862,5 @@ my $repo_server = $user->get_repo_server(repo => $repo_name); my $repo_username = $user->get_repo_username(repo => $repo_name); + my $repo_password = $user->get_repo_password(repo => $repo_name); my $repo_type = $user->get_repo_type(repo => $repo_name); my $repo_connection = $user->get_repo_connection(repo => $repo_name); @@ -2121,4 +2125,5 @@ my $repo_server = $user->get_repo_server(repo => $repo_name); my $repo_username = $user->get_repo_username(repo => $repo_name); + my $repo_password = $user->get_repo_password(repo => $repo_name); my $repo_type = $user->get_repo_type(repo => $repo_name); my $repo_connection = $user->get_repo_connection(repo => $repo_name); @@ -2294,4 +2299,5 @@ my $repo_server = $args{'repo_server'}; my $repo_username = $args{'repo_username'}; + my $repo_password = $args{'repo_password'}; my $repo_type = $args{'repo_type'}; my $repo_connection = $args{'repo_connection'}; |
From: Rob H. <for...@us...> - 2002-04-02 07:25:38
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv13393/templates Modified Files: repository.html Log Message: * added password to .user.cfg Index: repository.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/repository.html,v retrieving revision 1.15 retrieving revision 1.16 diff -U2 -r1.15 -r1.16 --- repository.html 22 Mar 2002 21:21:27 -0000 1.15 +++ repository.html 2 Apr 2002 07:25:33 -0000 1.16 @@ -1,3 +1,3 @@ -<form submit="<TMPL_VAR NAME=PROGNAME>" name="repository"> +<form submit="<TMPL_VAR NAME=PROGNAME>" name="repository" method="post"> <input type="hidden" name="action" value="repository"> <!-- <input type="hidden" name="repository_selected" value="<TMPL_VAR NAME=REPOSITORY_SELECTED>"> --> @@ -37,4 +37,12 @@ <td width="90%" align="left"> <input type="text" name="repo_username" value="<TMPL_VAR NAME=REPO_USERNAME>" /> + </td> + </tr> + <tr> + <td width="20%" align="right"> + Password : + </td> + <td width="90%" align="left"> + <input type="password" name="repo_password" /> </td> </tr> |
From: Rob H. <for...@us...> - 2002-04-02 06:38:52
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv693/bin Modified Files: sandweb-expect Log Message: * sandweb-expect is now capable of answering SSH if it asks if the user would like to save the hostkey to disk ( the first time a host is contacted by default ) * sandweb-expect is now installed and perms set correctly by tools/install_script.pl * i think cvs.pm should be getting values out of the config file, there is no "default" location for things like CVS and SSH. this should be decided by the sysadmin. I changed them to match my current system, but it doesn't make them "right". Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.2 retrieving revision 1.3 diff -U2 -r1.2 -r1.3 --- sandweb-expect 2 Apr 2002 03:45:41 -0000 1.2 +++ sandweb-expect 2 Apr 2002 06:38:46 -0000 1.3 @@ -1,3 +1,3 @@ -#!/usr/local/bin/expect -f +#!/usr/bin/expect -f # Unix account, vcs password : @@ -16,5 +16,5 @@ set vcs_command [lindex $argv 6] - spawn /usr/bin/su - $system_username -c $vcs_command + spawn /bin/su - $system_username -c $vcs_command expect { @@ -25,4 +25,5 @@ expect { "password:" { send "$vcs_password\r" } + "Are you sure" { send "yes\r" } eof { send_user "Unexpected EOF\r\n" } } @@ -35,5 +36,5 @@ set vcs_command [lindex $argv 3] - spawn /usr/bin/su - $system_username -c $vcs_command + spawn /bin/su - $system_username -c $vcs_command expect { @@ -47,8 +48,9 @@ set vcs_command [lindex $argv 2] - spawn /usr/bin/sh -c $vcs_command + spawn /bin/sh -c $vcs_command expect { "password:" { send "$vcs_password\r" } + "Are you sure" { send "yes\r" } eof { send_user "Unexpected EOF\r\n" } } |
From: Rob H. <for...@us...> - 2002-04-02 06:38:52
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv693/lib/SandWeb/Repository Modified Files: cvs.pm Log Message: * sandweb-expect is now capable of answering SSH if it asks if the user would like to save the hostkey to disk ( the first time a host is contacted by default ) * sandweb-expect is now installed and perms set correctly by tools/install_script.pl * i think cvs.pm should be getting values out of the config file, there is no "default" location for things like CVS and SSH. this should be decided by the sysadmin. I changed them to match my current system, but it doesn't make them "right". Index: cvs.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -U2 -r1.7 -r1.8 --- cvs.pm 2 Apr 2002 02:53:47 -0000 1.7 +++ cvs.pm 2 Apr 2002 06:38:46 -0000 1.8 @@ -810,5 +810,5 @@ my $output = $shell->execute( - 'command' => "cd $sandbox && CVS_RSH=/usr/local/bin/ssh && export CVS_RSH && /usr/local/bin/cvs -d $root $param $file", + 'command' => "cd $sandbox && CVS_RSH=/usr/local/bin/ssh && export CVS_RSH && /usr/bin/cvs -d $root $param $file", ); |
From: Rob H. <for...@us...> - 2002-04-02 06:38:51
|
Update of /cvsroot/sandweb/sandweb/tools In directory usw-pr-cvs1:/tmp/cvs-serv693/tools Modified Files: install_script.pl Log Message: * sandweb-expect is now capable of answering SSH if it asks if the user would like to save the hostkey to disk ( the first time a host is contacted by default ) * sandweb-expect is now installed and perms set correctly by tools/install_script.pl * i think cvs.pm should be getting values out of the config file, there is no "default" location for things like CVS and SSH. this should be decided by the sysadmin. I changed them to match my current system, but it doesn't make them "right". Index: install_script.pl =================================================================== RCS file: /cvsroot/sandweb/sandweb/tools/install_script.pl,v retrieving revision 1.13 retrieving revision 1.14 diff -U2 -r1.13 -r1.14 --- install_script.pl 28 Mar 2002 06:07:18 -0000 1.13 +++ install_script.pl 2 Apr 2002 06:38:46 -0000 1.14 @@ -32,4 +32,5 @@ # bin $bindir = instbin($bindir, 'sandweb-admin'); +$bindir = instbin($bindir, 'sandweb-expect'); exit(2) if (!$bindir); @@ -95,4 +96,17 @@ print "unable to locate $bindir/sandweb-admin\n"; exit(7); +} +# set permissions on installed sandweb-expect +if (-f "$bindir/sandweb-expect") { + my $httpuser_uid = &getuid($httpuser); + if ($httpuser_uid == -1) { + print "Unable to get UID of $httpuser\n"; + exit(6); + } + #print "Setting ownership of $PREFIX/bin/sandweb-expect to: $httpuser_uid:0\n"; + chown($httpuser_uid, 0, "$bindir/sandweb-expect"); +} else { + print "unable to locate $bindir/sandweb-expect\n"; + exit(8); } |
From: Rob H. <for...@us...> - 2002-04-02 03:45:44
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv2210/bin Modified Files: sandweb-expect Log Message: * no longer prints user's SSH password. Oh happy day :) Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- sandweb-expect 2 Apr 2002 01:37:22 -0000 1.1 +++ sandweb-expect 2 Apr 2002 03:45:41 -0000 1.2 @@ -57,6 +57,6 @@ expect { eof { - send_user "EOF received\r\n" - exit + # success + exit 0 } } |
From: Rob H. <for...@us...> - 2002-04-02 03:45:44
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv2210/lib/SandWeb Modified Files: Shell.pm Log Message: * no longer prints user's SSH password. Oh happy day :) Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- Shell.pm 2 Apr 2002 02:54:43 -0000 1.1 +++ Shell.pm 2 Apr 2002 03:45:41 -0000 1.2 @@ -56,10 +56,19 @@ if ( $system_username && $system_password ) { if ( $vcs_username && $vcs_password ) { - $output = `$sandweb_expect unix_vcs $system_username $system_password $vcs_password $command`; + my @raw_output = split('\n', `$sandweb_expect unix_vcs $system_username $system_password $vcs_password $command`); + shift @raw_output; + shift @raw_output; + $output = join('', @raw_output); } else { - $output = `$sandweb_expect unix $system_username $system_password $command`; + my @raw_output = split('\n', `$sandweb_expect unix $system_username $system_password $command`); + shift @raw_output; + shift @raw_output; + $output = join('', @raw_output); } } elsif ( $vcs_username && $vcs_password ) { - $output = `$sandweb_expect vcs $vcs_password "$command"`; + my @raw_output = split('\n', `$sandweb_expect vcs $vcs_password "$command"`); + shift @raw_output; + shift @raw_output; + $output = join('', @raw_output); } else { $output = `$command`; |
From: Rob H. <for...@us...> - 2002-04-02 02:54:46
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv25559/lib/SandWeb Added Files: Shell.pm Log Message: * Shell abstracts calls to the shell, so we can decide if we want to go through sandweb-expect or not. --- NEW FILE --- # # SandWeb (Web-based VCS client) # # Copyright (C) 2002 Nick Jennings # Copyright (C) 2002 Robert Helmer # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # package SandWeb::Shell; sub new { my $class = shift; my %args = @_; my $system_username = $args{'system_username'} || ''; my $system_password = $args{'system_password'} || ''; my $vcs_username = $args{'vcs_username'} || ''; my $vcs_password = $args{'vcs_password'} || ''; my $self = bless { 'system_username' => "$system_username", 'system_password' => "$system_password", 'vcs_username' => "$vcs_username", 'vcs_password' => "$vcs_password", }, $class; return $self; } sub execute { my $self = shift; my %args = @_; my $system_username = $self->{'system_username'}; my $system_password = $self->{'system_password'}; my $vcs_username = $self->{'vcs_username'}; my $vcs_password = $self->{'vcs_password'}; my $command = $args{'command'}; my $output; my $sandweb_expect = '/usr/local/bin/sandweb-expect'; if ( $system_username && $system_password ) { if ( $vcs_username && $vcs_password ) { $output = `$sandweb_expect unix_vcs $system_username $system_password $vcs_password $command`; } else { $output = `$sandweb_expect unix $system_username $system_password $command`; } } elsif ( $vcs_username && $vcs_password ) { $output = `$sandweb_expect vcs $vcs_password "$command"`; } else { $output = `$command`; } return $output; } 1; |
From: Rob H. <for...@us...> - 2002-04-02 02:53:50
|
Update of /cvsroot/sandweb/sandweb In directory usw-pr-cvs1:/tmp/cvs-serv24953 Modified Files: MANIFEST Log Message: cool, SSH w/ FlatFile auth works now ( needs a better front-end implementation, I just entered my info into the CGI to test it ). Unix auth with and without SSH should work too, I haven't tested it though. Index: MANIFEST =================================================================== RCS file: /cvsroot/sandweb/sandweb/MANIFEST,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- MANIFEST 28 Mar 2002 20:22:35 -0000 1.9 +++ MANIFEST 2 Apr 2002 02:53:44 -0000 1.10 @@ -22,4 +22,5 @@ lib/SandWeb/Repository.pm lib/SandWeb/Repository/cvs.pm +lib/SandWeb/Shell.pm templates/file.html |
From: Rob H. <for...@us...> - 2002-04-02 02:53:50
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv24953/lib/SandWeb Modified Files: Repository.pm Log Message: cool, SSH w/ FlatFile auth works now ( needs a better front-end implementation, I just entered my info into the CGI to test it ). Unix auth with and without SSH should work too, I haven't tested it though. Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.35 retrieving revision 1.36 diff -U2 -r1.35 -r1.36 --- Repository.pm 1 Apr 2002 23:15:16 -0000 1.35 +++ Repository.pm 2 Apr 2002 02:53:46 -0000 1.36 @@ -51,11 +51,19 @@ my $sandbox = $args{'sandbox'} || ''; - # $username specifies the current user's name on the server + # $vcs_username specifies the current user's name on the server - my $username = $args{'username'} || ''; + my $vcs_username = $args{'vcs_username'} || ''; - # $password specifies the current user's password on the server + # $vcs_password specifies the current user's password on the server - my $password = $args{'password'} || ''; + my $vcs_password = $args{'vcs_password'} || ''; + + # $system_username specifies the current user's name on the server + + my $system_username = $args{'system_username'} || ''; + + # $system_password specifies the current user's password on the server + + my $system_password = $args{'system_password'} || ''; # $server specifies the hostname of the current repo server @@ -69,7 +77,7 @@ } elsif ( $connection eq 'pserver' ) { - $root = ":pserver:$username\@$server:$root"; + $root = ":pserver:$vcs_username\@$server:$root"; } else { - $root = ":ext:$connection:$username\@$server:$root"; + $root = ":ext:$vcs_username\@$server:$root"; } @@ -77,6 +85,8 @@ root => $repo_root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); } @@ -87,4 +97,8 @@ 'root' => $root, 'sandbox' => $sandbox, + 'vcs_username' => $vcs_username, + 'vcs_password' => $vcs_password, + 'system_username' => $system_username, + 'system_password' => $system_password, # 'vcs' => $vcs, }, $class; @@ -103,10 +117,16 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new( root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); @@ -132,10 +152,16 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new( root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); @@ -162,4 +188,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -188,10 +218,16 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new( root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, file => $file, ); @@ -219,10 +255,16 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new( root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); @@ -252,4 +294,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; @@ -257,6 +303,8 @@ root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); @@ -286,4 +334,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -310,4 +362,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -330,4 +386,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -349,4 +409,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -368,10 +432,16 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new( root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); @@ -412,4 +482,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -429,4 +503,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -449,4 +527,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -471,4 +553,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -497,4 +583,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; @@ -502,6 +592,8 @@ root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); @@ -532,4 +624,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -559,4 +655,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -587,4 +687,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; @@ -592,6 +696,8 @@ root => $root, sandbox => $sandbox, - username => $username, - password => $password, + system_username => $system_username, + system_password => $system_password, + vcs_username => $vcs_username, + vcs_password => $vcs_password, ); @@ -629,4 +735,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -655,4 +765,8 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my %return; my $vcs = SandWeb::Repository::cvs->new(root => $root, @@ -718,5 +832,5 @@ # XXX Not supported ( yet ) # 'pserver', -# 'SSH', + 'SSH', # 'RSH', ); @@ -745,4 +859,42 @@ if ($self->{'sandbox'}) { return $self->{'sandbox'}; + } + else { + return 0; + } +} + +sub get_vcs_username { + my $self = shift; + if ($self->{'vcs_username'}) { + return $self->{'vcs_username'}; + } + else { + return 0; + } +} + +sub get_vcs_password { + my $self = shift; + if ($self->{'vcs_password'}) { + return $self->{'vcs_password'}; + } + else { + return 0; + } +} +sub get_system_username { + my $self = shift; + if ($self->{'system_username'}) { + return $self->{'system_username'}; + } + else { + return 0; + } +} +sub get_system_password { + my $self = shift; + if ($self->{'system_password'}) { + return $self->{'system_password'}; } else { |
From: Rob H. <for...@us...> - 2002-04-02 02:53:50
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv24953/lib/SandWeb/Repository Modified Files: cvs.pm Log Message: cool, SSH w/ FlatFile auth works now ( needs a better front-end implementation, I just entered my info into the CGI to test it ). Unix auth with and without SSH should work too, I haven't tested it though. Index: cvs.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- cvs.pm 1 Apr 2002 23:15:16 -0000 1.6 +++ cvs.pm 2 Apr 2002 02:53:47 -0000 1.7 @@ -26,4 +26,5 @@ use SandWeb::Diff; +use SandWeb::Shell; sub new { @@ -33,12 +34,16 @@ my $root = $args{'root'} || ''; my $sandbox = $args{'sandbox'} || ''; - my $username = $args{'username'} || ''; - my $password = $args{'password'} || ''; + my $vcs_username = $args{'vcs_username'} || ''; + my $vcs_password = $args{'vcs_password'} || ''; + my $system_username = $args{'system_username'} || ''; + my $system_password = $args{'system_password'} || ''; my $self = bless { 'root' => $root, 'sandbox' => $sandbox, - 'username' => $username, - 'password' => $password, + 'vcs_username' => $vcs_username, + 'vcs_password' => $vcs_password, + 'system_username' => $system_username, + 'system_password' => $system_password, }, $class; @@ -789,11 +794,22 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); - my $username = $self->get_username(); - my $password = $self->get_password(); + my $vcs_username = $self->get_vcs_username(); + my $vcs_password = $self->get_vcs_password(); + my $system_username = $self->get_system_username(); + my $system_password = $self->get_system_password(); my $file = $args{'file'}; my $param = $args{'param'}; - my $output = `cd \"$sandbox\" && cvs -d $root $param \"$file\" 2>&1`; + my $shell = SandWeb::Shell->new( + 'vcs_username' => "$vcs_username", + 'vcs_password' => "$vcs_password", + 'system_username' => "$system_username", + 'system_password' => "$system_password", + ); + + my $output = $shell->execute( + 'command' => "cd $sandbox && CVS_RSH=/usr/local/bin/ssh && export CVS_RSH && /usr/local/bin/cvs -d $root $param $file", + ); return $output; @@ -820,8 +836,28 @@ } -sub get_username { +sub get_vcs_username { + my $self = shift; + if ($self->{'vcs_username'}) { + return $self->{'vcs_username'}; + } + else { + return 0; + } +} + +sub get_vcs_password { + my $self = shift; + if ($self->{'vcs_password'}) { + return $self->{'vcs_password'}; + } + else { + return 0; + } +} + +sub get_system_username { my $self = shift; - if ($self->{'username'}) { - return $self->{'username'}; + if ($self->{'system_password'}) { + return $self->{'system_username'}; } else { @@ -830,8 +866,8 @@ } -sub get_password { +sub get_system_password { my $self = shift; - if ($self->{'password'}) { - return $self->{'password'}; + if ($self->{'system_password'}) { + return $self->{'system_password'}; } else { |
From: Rob H. <for...@us...> - 2002-04-02 02:53:50
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv24953/bin Modified Files: sandweb.cgi Log Message: cool, SSH w/ FlatFile auth works now ( needs a better front-end implementation, I just entered my info into the CGI to test it ). Unix auth with and without SSH should work too, I haven't tested it though. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.279 retrieving revision 1.280 diff -U2 -r1.279 -r1.280 --- sandweb.cgi 28 Mar 2002 06:32:33 -0000 1.279 +++ sandweb.cgi 2 Apr 2002 02:53:46 -0000 1.280 @@ -83,4 +83,8 @@ my $user_cfg = 'user.cfg'; +my $repo_password = ''; +my $system_username = ''; +my $system_password = ''; + ############################################################################### # main @@ -614,5 +618,8 @@ 'root' => $repo_root, 'connection' => $repo_connection, - 'username' => $repo_username, + 'vcs_username' => $repo_username, + 'vcs_password' => $repo_password, + 'system_username' => $system_username, + 'system_password' => $system_password, 'server' => $repo_server, 'repo_type' => $repo_type, @@ -1886,5 +1893,8 @@ root => $repo_root, connection => $repo_connection, - username => $repo_username, + 'vcs_username' => $repo_username, + 'vcs_password' => $repo_password, + 'system_username' => $system_username, + 'system_password' => $system_password, server => $repo_server, repo_type => $repo_type, @@ -2158,5 +2168,8 @@ root => $repo_root, connection => $repo_connection, - username => $repo_username, + 'vcs_username' => $repo_username, + 'vcs_password' => $repo_password, + 'system_username' => $system_username, + 'system_password' => $system_password, server => $repo_server, repo_type => $repo_type, |
From: Rob H. <for...@us...> - 2002-04-02 01:37:26
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv8347 Added Files: sandweb-expect Log Message: * expect script for handling SSH as the CVS_RSH method in a CVS :ext: connection type, should also work for pserver logins This script can handle su'ing to a Unix account, su'ing to a Unix account and answering a CVS password prompt, and just answering the CVS password prompt, depending on the first letter of invocation ( either unix_vcs, unix or vcs ). Note: this script is set up for my Solaris box currently, it needs to be installed into /usr/local/bin with host-specific settings in order for it to work anywhere else. Solaris does crack-ass things like making /bin a symlink to /usr/bin, so I have to set the shell to "/usr/bin/sh". blah. --- NEW FILE --- #!/usr/local/bin/expect -f # Unix account, vcs password : # input : unix_vcs system_username system_password vcs_password vcs_command # # Unix account, no vcs password : # input : unix system_username system_password vcs_command # # No Unix account, vcs password: # input : vcs vcs_password vcs_command if {[lindex $argv 0]=="unix_vcs"} { set system_username [lindex $argv 1] set system_password [lindex $argv 2] set vcs_password [lindex $argv 5] set vcs_command [lindex $argv 6] spawn /usr/bin/su - $system_username -c $vcs_command expect { "Password:" { send "$system_password\r" } eof { send_user "Unexpected EOF\r\n" } } expect { "password:" { send "$vcs_password\r" } eof { send_user "Unexpected EOF\r\n" } } } if {[lindex $argv 0]=="unix"} { set system_username [lindex $argv 1] set system_password [lindex $argv 2] set vcs_command [lindex $argv 3] spawn /usr/bin/su - $system_username -c $vcs_command expect { "Password:" { send "$system_password\r" } eof { send_user "Unexpected EOF\r\n" } } } if {[lindex $argv 0]=="vcs"} { set vcs_password [lindex $argv 1] set vcs_command [lindex $argv 2] spawn /usr/bin/sh -c $vcs_command expect { "password:" { send "$vcs_password\r" } eof { send_user "Unexpected EOF\r\n" } } } expect { eof { send_user "EOF received\r\n" exit } } |
From: Rob H. <for...@us...> - 2002-04-01 23:15:19
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv8164/Repository Modified Files: cvs.pm Log Message: First step towards SSH support in CVS : * Repository and cvs now accept username and password * cvs calls a "shell" method to actually execute commands, this will probably be handed over to new class, Shell, that decides whether it needs to call sandweb-expect or not, and if so, what it needs to do Note that if this is done properly, it provides all the peices that we need for Unix execution ( especially abstracting stuff to Shell ). I'm just working on SSH right now though. Index: cvs.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -U2 -r1.5 -r1.6 --- cvs.pm 28 Mar 2002 23:43:36 -0000 1.5 +++ cvs.pm 1 Apr 2002 23:15:16 -0000 1.6 @@ -31,10 +31,14 @@ my %args = @_; - my $root = $args{'root'}; - my $sandbox = $args{'sandbox'}; + my $root = $args{'root'} || ''; + my $sandbox = $args{'sandbox'} || ''; + my $username = $args{'username'} || ''; + my $password = $args{'password'} || ''; my $self = bless { 'root' => $root, 'sandbox' => $sandbox, + 'username' => $username, + 'password' => $password, }, $class; @@ -50,6 +54,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'add'; @@ -60,5 +62,8 @@ if ($message) { push @param, " -m $message" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -85,6 +90,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'admin'; @@ -115,6 +118,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'annotate'; @@ -123,5 +124,8 @@ if ($recurse) { push @param, " -R" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -148,6 +152,4 @@ my $date = $args{'date'}; my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = "checkout -d $file"; @@ -156,6 +158,8 @@ if ($date) { push @param, " $date" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; - + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -185,6 +189,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'commit'; @@ -199,5 +201,8 @@ } else { push @param, " -m \"$message\""; - $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); }; @@ -229,6 +234,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'diff'; @@ -241,5 +244,8 @@ print "cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1"; - my $raw_output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my @raw_output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -272,6 +278,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'edit'; @@ -279,5 +283,8 @@ if ($recurse) { push @param, " -R" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -303,11 +310,12 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'editors'; if ($recurse) { push @param, " -R" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -332,9 +340,10 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'history'; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -359,9 +368,10 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'init'; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -386,10 +396,10 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'log'; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; - + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -414,6 +424,4 @@ my $password = $args{'password'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'login'; @@ -425,5 +433,8 @@ } - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -445,9 +456,10 @@ my $self = shift; my %args = @_; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'logout'; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -473,11 +485,12 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'release'; if ($delete) { push @param, " -f" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -505,6 +518,4 @@ my $force = $args{'force'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'remove'; @@ -512,5 +523,8 @@ if ($recurse) { push @param, " -R" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -537,6 +551,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'status'; @@ -544,5 +556,8 @@ if ($verbose) { push @param, " -v" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -573,6 +588,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'tag'; @@ -584,5 +597,8 @@ if ($name) { push @param, " $name" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -608,11 +624,12 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'unedit'; if ($recurse) { push @param, " -R" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -645,6 +662,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'update'; @@ -659,5 +674,8 @@ my @output_lines = (); - my @raw_output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my @raw_output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -708,6 +726,4 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'watch'; @@ -716,5 +732,8 @@ if ($recurse) { push @param, " -R" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -740,11 +759,12 @@ my $file = $args{'file'}; - my $root = $self->get_root(); - my $sandbox = $self->get_sandbox(); my @param = 'watchers'; if ($recurse) { push @param, " -R" }; - my $output = `cd \"$sandbox\" && cvs -d $root @param \"$file\" 2>&1`; + my $output = $self->shell( + 'param' => join('', @param), + 'file' => "$file", + ); my $errorlevel = $?; @@ -763,4 +783,21 @@ } +sub shell { + my $self = shift; + my %args = @_; + + my $root = $self->get_root(); + my $sandbox = $self->get_sandbox(); + my $username = $self->get_username(); + my $password = $self->get_password(); + + my $file = $args{'file'}; + my $param = $args{'param'}; + + my $output = `cd \"$sandbox\" && cvs -d $root $param \"$file\" 2>&1`; + + return $output; +} + sub get_sandbox { my $self = shift; @@ -777,4 +814,24 @@ if ($self->{'root'}) { return $self->{'root'}; + } + else { + return 0; + } +} + +sub get_username { + my $self = shift; + if ($self->{'username'}) { + return $self->{'username'}; + } + else { + return 0; + } +} + +sub get_password { + my $self = shift; + if ($self->{'password'}) { + return $self->{'password'}; } else { |
From: Rob H. <for...@us...> - 2002-04-01 23:15:19
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv8164 Modified Files: Repository.pm Log Message: First step towards SSH support in CVS : * Repository and cvs now accept username and password * cvs calls a "shell" method to actually execute commands, this will probably be handed over to new class, Shell, that decides whether it needs to call sandweb-expect or not, and if so, what it needs to do Note that if this is done properly, it provides all the peices that we need for Unix execution ( especially abstracting stuff to Shell ). I'm just working on SSH right now though. Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -U2 -r1.34 -r1.35 --- Repository.pm 28 Mar 2002 06:32:33 -0000 1.34 +++ Repository.pm 1 Apr 2002 23:15:16 -0000 1.35 @@ -33,10 +33,10 @@ # Valid types : CVS - my $repo_type = $args{'repo_type'}; + my $repo_type = $args{'repo_type'} || ''; # $root specifies the path to the root of the repository # Example : CVSROOT ( :ext:user@host:/var/cvs ) - my $root = $args{'root'}; + my $root = $args{'root'} || ''; # $connection specifies whether this is a local or network @@ -44,18 +44,22 @@ # Examples : SSH, pserver, local - my $connection = $args{'connection'}; + my $connection = $args{'connection'} || ''; # $sandbox specifies the path to the user's working directory # on the server - my $sandbox = $args{'sandbox'}; + my $sandbox = $args{'sandbox'} || ''; # $username specifies the current user's name on the server - my $username = $args{'username'}; + my $username = $args{'username'} || ''; + + # $password specifies the current user's password on the server + + my $password = $args{'password'} || ''; # $server specifies the hostname of the current repo server - my $server = $args{'server'}; + my $server = $args{'server'} || ''; if ($repo_type) { @@ -73,4 +77,6 @@ root => $repo_root, sandbox => $sandbox, + username => $username, + password => $password, ); } @@ -101,4 +107,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, ); @@ -128,4 +136,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, ); @@ -182,4 +192,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, file => $file, ); @@ -211,4 +223,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, ); @@ -243,4 +257,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, ); @@ -356,4 +372,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, ); @@ -484,4 +502,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, ); @@ -572,4 +592,6 @@ root => $root, sandbox => $sandbox, + username => $username, + password => $password, ); |
From: Rob H. <for...@us...> - 2002-03-28 23:43:39
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv4169/lib/SandWeb/Repository Modified Files: cvs.pm Log Message: argh, cvs.pm was returning true no matter if an operation failed or not. that made it possible to get unremovable sandbox entries in the sandbox menu. Index: cvs.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -U2 -r1.4 -r1.5 --- cvs.pm 23 Mar 2002 20:51:24 -0000 1.4 +++ cvs.pm 28 Mar 2002 23:43:36 -0000 1.5 @@ -65,4 +65,6 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; + } else { + $errorlevel = 0; } @@ -92,4 +94,6 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; + } else { + $errorlevel = 0; } @@ -124,5 +128,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -156,5 +162,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -198,5 +206,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -236,5 +246,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my $diff = SandWeb::Diff->new( @@ -272,5 +284,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -300,5 +314,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -325,5 +341,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -350,5 +368,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -376,5 +396,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -408,5 +430,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -430,5 +454,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -458,5 +484,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -489,5 +517,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -519,5 +549,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -557,5 +589,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -585,5 +619,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -628,5 +664,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } foreach my $line (@raw_output) { @@ -683,5 +721,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( @@ -711,5 +751,7 @@ if ( $errorlevel == 0 ) { $errorlevel = 1; - } + } else { + $errorlevel = 0; + } my %return = ( |
From: Nick J. <nje...@us...> - 2002-03-28 20:22:39
|
Update of /cvsroot/sandweb/sandweb In directory usw-pr-cvs1:/tmp/cvs-serv10130 Modified Files: MANIFEST Log Message: Added NEWS and ChangeLog to MANIFEST. This should have been included for the ALPHA release. But too late now! OOPS! :) Index: MANIFEST =================================================================== RCS file: /cvsroot/sandweb/sandweb/MANIFEST,v retrieving revision 1.8 retrieving revision 1.9 diff -U2 -r1.8 -r1.9 --- MANIFEST 28 Mar 2002 06:14:09 -0000 1.8 +++ MANIFEST 28 Mar 2002 20:22:35 -0000 1.9 @@ -1,2 +1,4 @@ +NEWS +ChangeLog README INSTALL |
From: Nick J. <nje...@us...> - 2002-03-28 07:28:45
|
Update of /cvsroot/sandweb/sandweb In directory usw-pr-cvs1:/tmp/cvs-serv28296 Modified Files: NEWS Log Message: added release tag name Index: NEWS =================================================================== RCS file: /cvsroot/sandweb/sandweb/NEWS,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- NEWS 28 Mar 2002 07:21:21 -0000 1.1 +++ NEWS 28 Mar 2002 07:28:43 -0000 1.2 @@ -6,2 +6,4 @@ authentication method). + Tag name: release-ALPHA + |
From: Nick J. <nje...@us...> - 2002-03-28 07:21:23
|
Update of /cvsroot/sandweb/sandweb In directory usw-pr-cvs1:/tmp/cvs-serv26983 Added Files: NEWS Log Message: added NEWS file --- NEW FILE --- 2002-03-28 ALPHA version released. First release of SandWeb, hooray! This version only supports local CVS repositories, and multiple user accounts (using the SandWeb FlatFile authentication method). |