Author: mzugec Date: Fri Mar 6 09:48:41 2009 New Revision: 55957 URL: http://svn.opensuse.org/viewcvs/yast?rev=55957&view=rev Log: removed unused code Modified: trunk/http-server/src/YaPI/HTTPD.pm trunk/http-server/src/YaPI/HTTPDModules.pm trunk/http-server/src/YaST/HTTPDData.pm trunk/http-server/src/YaST/httpdUtils.pm Modified: trunk/http-server/src/YaPI/HTTPD.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/YaPI/HTTPD.pm?rev=55957&r1=55956&r2=55957&view=diff ============================================================================== --- trunk/http-server/src/YaPI/HTTPD.pm (original) +++ trunk/http-server/src/YaPI/HTTPD.pm Fri Mar 6 09:48:41 2009 @@ -528,16 +528,6 @@ } else { $vhost_files->{$ip} = [{HOSTID => "$ip/$servername", HostIP => $ip, DATA => \@newdata}]; } - - - -#$vhost_files->{$ip} = \@newdata; -# deleteVH() if (@{$self->GetHost($hostid)} ne 0); - -# if ($type eq "0"){ -# $vhost_files->{$ip} = @newdata; -# } - } @@ -579,17 +569,7 @@ my $data = shift; -# my @newdata = (); -# foreach my $row (@{$data}){ -# if ($row->{KEY} eq 'HostIP' ) { -# $ip = $row->{VALUE}; -# } elsif ($row->{KEY} eq 'VirtualByName' ) { -# $type = $row->{VALUE}; -# }else { -# push(@newdata, $row); -# } -# } -my $params = $self->getVhType($hostid); + my $params = $self->getVhType($hostid); $self->deleteVH($hostid); $self->createVH($hostid, $data, $params); @@ -781,17 +761,6 @@ if( $key->{KEY} eq 'VirtualByName' ) { $VirtualByName = $key->{VALUE}; } -#elsif( $key->{KEY} eq 'SSL' and $key->{VALUE} == 1 ) { -# $sslHash->{'VALUE'} = 'on'; -# } elsif( $key->{KEY} eq 'SSL' and $key->{VALUE} == 2 ) { -# $sslHash->{'VALUE'} = 'on'; -# push( @tmp, { KEY => 'SSLRequireSSL', VALUE => '' } ); -# } elsif( $key->{KEY} eq 'SSL' ) { -# # already set to "off" above. So ignore. -# } elsif( $key->{KEY} eq 'DocumentRoot' ) { -# $docRoot = $key->{VALUE}; -# push( @tmp, $key ); -# } els if( $key->{KEY} =~ /ServerTokens|TimeOut|ExtendedStatus/ ) { # illegal keys in vhost return $self->SetError( summary => sprintf(__("Illegal key in vhost '%s'."), $key->{KEY}), @@ -1622,15 +1591,11 @@ $file .= '-cert.pem'; if( not $pemData ) { -# SCR->Execute( '.target.remove', $file ); -# $self->ModifyHostKey( $host, 'SSLCertificateFile' ); } elsif( $pemData !~ /BEGIN CERTIFICATE/ ) { return $self->SetError( summary => __("Corrupt PEM data."), code => 'CERT_ERROR' ); } else { SCR->Write( '.target.string', $file, $pemData ); SCR->Execute( '.target.bash', "chmod 0400 $file" ); -# $self->ModifyHostKey( $host, 'SSLCertificateFile', $file ); -# $self->ModifyHostKey( $host, 'SSLCertificateKeyFile', $file ) if( $key ); } return $self->ModifyHost( $hostid, $host ); } @@ -1673,16 +1638,12 @@ $file .= '-key.pem'; if( not $pemData ) { -# SCR->Execute( '.target.remove', $file ); -# $self->ModifyHostKey( $host, 'SSLCertificateKeyFile' ); } elsif( $pemData !~ /PRIVATE KEY/ ) { return $self->SetError( summary => __("Corrupt PEM data."), code => 'CERT_ERROR' ); } else { my $cert = ($pemData =~ /BEGIN CERTIFICATE/)?(1):(0); SCR->Write( '.target.string', $file, $pemData ); SCR->Execute( '.target.bash', "chmod 0400 $file" ); -# $self->ModifyHostKey( $host, 'SSLCertificateKeyFile', $file ); -# $self->ModifyHostKey( $host, 'SSLCertificateFile', $file ) if( $cert ); } return $self->ModifyHost( $hostid, $host ); } Modified: trunk/http-server/src/YaPI/HTTPDModules.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/YaPI/HTTPDModules.pm?rev=55957&r1=55956&r2=55957&view=diff ============================================================================== --- trunk/http-server/src/YaPI/HTTPDModules.pm (original) +++ trunk/http-server/src/YaPI/HTTPDModules.pm Fri Mar 6 09:48:41 2009 @@ -93,14 +93,10 @@ suggested => 0, position => 50, module => { -# AuthDBMAuthoritative => 'mod_auth_dbm', -# AuthDBMGroupFile => 'mod_auth_dbm', AuthDBMType => 'mod_auth_dbm', AuthDBMUserFile => 'mod_auth_dbm' }, directives=> [ -#{ option => "AuthDBMAuthoritative", "context" => [ "Directory" ] , "values" => [ "On", "Off" ] }, -# { option => "AuthDBMGroupFile", "context" => [ "Directory" ] }, { option => "AuthDBMType", "context" => [ "Directory" ] , "values" => [ "default", "SDBM", "GDBM", "NDBM", "DB" ] }, { option => "AuthDBMUserFile", "context" => [ "Directory" ] } @@ -806,17 +802,6 @@ { option =>"VirtualScriptAliasIP", "context" => [ "Server", "Virtual", "Directory" ] } ] }, - -# 'php4' => { -# summary => 'Provides support for PHP4 dynamically generated pages', -# packages => ["apache2-mod_php4"], -# default => 0, -# required => 0, -# suggested => 0, -# position => 490, -# exclude => [ "php5" ] -# }, - 'php5' => { summary => __("Provides support for PHP5 dynamically generated pages"), packages => ["apache2-mod_php5"], @@ -849,6 +834,22 @@ required => 0, suggested => 0, position => 530 + }, + 'authz_svn' => { + summary => __("Provides support for AppArmor subprocess confinement within apache"), + packages => ["subversion-server"], + default => 0, + required => 0, + suggested => 0, + position => 535 + }, + 'dav_svn' => { + summary => __("Provides support for AppArmor subprocess confinement within apache"), + packages => ["subversion-server"], + default => 0, + required => 0, + suggested => 0, + position => 540 } ); Modified: trunk/http-server/src/YaST/HTTPDData.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/YaST/HTTPDData.pm?rev=55957&r1=55956&r2=55957&view=diff ============================================================================== --- trunk/http-server/src/YaST/HTTPDData.pm (original) +++ trunk/http-server/src/YaST/HTTPDData.pm Fri Mar 6 09:48:41 2009 @@ -97,8 +97,6 @@ } ] }; -# push( @{$hosts{'default'}}, $dirEntry ); -# $dirty{MODIFIED}->{'default'} = 1; return $dirEntry; } @@ -208,53 +206,10 @@ my $hostdata = shift; return undef if( ! $self->checkHostmap( $hostdata ) ); - -# my $dr; -# my $vbn; -# foreach my $h ( @{$hosts{$hostid}} ) { -# if( $h->{KEY} eq 'DocumentRoot' ) { -# $dr = $h->{VALUE}; -# } elsif( $h->{KEY} eq 'VirtualByName' ) { -# $vbn = $h->{VALUE}; -# } -# } -# $hosts{$hostid} = $hostdata; if ($hostid ne 'main') { YaPI::HTTPD->modifyVH($hostid, $hostdata); - - -# foreach my $h ( @{$hosts{$hostid}} ) { -# if( $h->{KEY} eq 'DocumentRoot' ) { -# if( $dr ne $h->{VALUE} ) { -# $self->delDir( $dr ); -# $self->addDir( $h->{VALUE} ); -# } -# } els -# if( $h->{KEY} eq 'VirtualByName' ) { -# if( $vbn ne $h->{VALUE} ) { -# $hostid =~ /^([^\/]+)/; -# my $vhost = $1; -# if( $h->{VALUE} == 1 and $self->getNVH( $vhost ) == 0 ) { -# push( @{$hosts{'main'}}, { KEY => 'NameVirtualHost', VALUE => $1 } ); -# } elsif( $h->{VALUE} == 0 and $self->getNVH( $vhost ) == 1 ) { -# my @newData = (); -# while( my $e = shift(@{$hosts{'main'}}) ) { -# if( $e->{KEY} eq 'NameVirtualHost' and -# $e->{VALUE} eq $vhost ) { -# push( @newData, @{$hosts{'main'}} ); -# last; -# } -# push( @newData, $e ); -# } -# $hosts{'main'} = \@newData; -# } -# $dirty{MODIFIED}->{'main'} = 1; -# } -# } -# } - $dirty{MODIFIED}->{$hostid} = 1 unless( exists($dirty{NEW}->{$hostid}) ); } else { YaPI::HTTPD->modifyMain($hostdata); @@ -272,19 +227,6 @@ if( ! $self->checkHostmap( $hostdata ) ) { return undef; } -# foreach my $h ( @$hostdata ) { -# if( $h->{KEY} eq 'DocumentRoot' ) { -# $dir=$self->addDir($h->{VALUE}); -# } elsif( $h->{KEY} eq 'VirtualByName' and $h->{VALUE} ) { -# $hostid =~ /^([^\/]+)/; -# my $v = $1; -# if( $self->getNVH( $v ) == 0 ) { -# push( @{$hosts{'main'}}, { KEY => 'NameVirtualHost', VALUE => $v } ); -# $dirty{MODIFIED}->{'main'} = 1; -# } -# } -# } - # don't create Directory for DocumentRoot, if already exists if ($dir ne ""){ foreach my $row (@$hostdata) { @@ -566,11 +508,8 @@ sub GetCurrentListen { my $self = shift; my @new; -#y2internal("BEGIN - newListen ", Dumper(\%newListen), "oldListen", Dumper(@oldListen), "delListen ", Dumper(\%delListen)); -#y2internal("new ", Dumper(\@new)); foreach my $new ( keys(%newListen) ) { my ($ip, $fp, $tp, $port) = ('', '', '', ''); -# if ( $new =~ m/\[([\w\W]*)\]/; #) { $ip=$1; if ($new =~ m/\[$ip\]:([\d\:]*)/){ @@ -580,10 +519,7 @@ } $tp=$fp if ($tp eq ''); $port = ($fp eq $tp)?($fp):($fp.'-'.$tp); -# } push( @new, { ADDRESS => $ip, PORT => $port } ); -#y2internal("MIDDLE newListen ", Dumper(\%newListen), "oldListen", Dumper(@oldListen), "delListen ", Dumper(\%delListen)); -#y2internal("new ", Dumper(\@new)); } foreach my $old ( @oldListen ) { if( $old->{PORT} =~ /-/ ) { @@ -596,8 +532,6 @@ } push( @new, $old ); } -#y2internal("END - newListen ", Dumper(\%newListen), "oldListen", Dumper(@oldListen), "delListen ", Dumper(\%delListen)); -#y2internal("new ", Dumper(\@new)); return \@new; } Modified: trunk/http-server/src/YaST/httpdUtils.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/YaST/httpdUtils.pm?rev=55957&r1=55956&r2=55957&view=diff ============================================================================== --- trunk/http-server/src/YaST/httpdUtils.pm (original) +++ trunk/http-server/src/YaST/httpdUtils.pm Fri Mar 6 09:48:41 2009 @@ -48,14 +48,9 @@ my %checkMap = ( ServerAdmin => qr/^[^@]+@[^@]+$/, ServerName => qr/^[\w\d.-]+$/, -# SSL => qr/^[012]$/, # more to go ); -# my $ssl = 0; -# my $nb_vh = 0; -# my $dr = 0; -# my $sn = 0; foreach my $entry ( @$host ) { next unless( exists($checkMap{$entry->{KEY}}) ); my $re = $checkMap{$entry->{KEY}}; @@ -63,10 +58,6 @@ return $self->SetError( summary => sprintf( __("Illegal '%s' parameter"), $entry->{KEY} ), code => "PARAM_CHECK_FAILED" ); } -# $ssl = $entry->{VALUE} if( $entry->{KEY} eq 'SSL' ); -# $nb_vh = $entry->{VALUE} if( $entry->{KEY} eq 'VirtualByName' ); -# $dr = 1 if( $entry->{KEY} eq 'DocumentRoot' ); -# $sn = 1 if( $entry->{KEY} eq 'ServerName' ); } return $self->SetError( summary => __('ssl together with "virtual by name" is not possible'), code => 'PARAM_CHECK_FAILED' ) if( $ssl and $nb_vh ); @@ -79,24 +70,6 @@ my $self = shift; my @data = SCR->Read('.http_server.vhosts'); - # this is a hack. - # yast will put some directives in define sections - # automatically and here we remove them - -# if( ref($data[0]) eq 'HASH' ) { -# foreach my $file ( keys %{$data[0]} ) { -# foreach my $host ( @{$data[0]->{$file}} ) { -# foreach my $data ( @{$host->{DATA}} ) { -# if( exists($data->{OVERHEAD}) and -# $data->{OVERHEAD} =~ /# YaST auto define section/ ) { -# $data = $data->{VALUE}->[0]; # delete the "auto define" section -# } -# } -# } -# } -# } - - return @data; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org