Author: mlandres
Date: Fri Oct 17 18:33:22 2008
New Revision: 11398
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11398&view=rev
Log:
Secure download of license file on repo refresh (bnc #372386)
Modified:
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc
trunk/libzypp/zypp/parser/susetags/RepoIndex.h
trunk/libzypp/zypp/repo/susetags/Downloader.cc
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11398&r1=11397&r2=11398&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Fri Oct 17 18:33:22 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Oct 17 18:31:47 CEST 2008 - ma@suse.de
+
+- Secure download of license file on repo refresh (bnc #372386)
+- revision 11398
+
+-------------------------------------------------------------------
Fri Oct 17 17:26:25 CEST 2008 - ma@suse.de
- Call 'repo2solv.sh -o' instead of using output redirection. (bnc #420046)
Modified: trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc?rev=11398&r1=11397&r2=11398&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/susetags/ContentFileReader.cc Fri Oct 17 18:33:22 2008
@@ -21,8 +21,6 @@
#include "zypp/parser/susetags/ContentFileReader.h"
#include "zypp/parser/susetags/RepoIndex.h"
-#include "zypp/ZConfig.h"
-
using std::endl;
#undef ZYPP_BASE_LOGGER_LOGGROUP
#define ZYPP_BASE_LOGGER_LOGGROUP "parser::susetags"
@@ -176,7 +174,7 @@
void ContentFileReader::parse( const InputStream & input_r,
const ProgressData::ReceiverFnc & fnc_r )
{
- MIL << "Start parsing " << input_r << endl;
+ MIL << "Start parsing content repoindex" << input_r << endl;
if ( ! input_r.stream() )
{
std::ostringstream s;
@@ -191,8 +189,6 @@
if ( ! ticks.toMin() )
userRequestedAbort( 0 );
- Arch sysarch( ZConfig::instance().systemArchitecture() );
-
iostr::EachLine line( input_r );
for( ; line; line.next() )
{
@@ -217,10 +213,6 @@
//
// ReppoIndex related data:
//
- else if ( key == "DEFAULTBASE" )
- {
- _pimpl->repoindex().defaultBase = Arch(value);
- }
else if ( key == "DESCRDIR" )
{
_pimpl->repoindex().descrdir = value;
@@ -229,10 +221,6 @@
{
_pimpl->repoindex().datadir = value;
}
- else if ( key == "FLAGS" )
- {
- str::split( value, std::back_inserter( _pimpl->repoindex().flags ) );
- }
else if ( key == "KEY" )
{
if ( _pimpl->setFileCheckSum( _pimpl->repoindex().signingKeys, value ) )
@@ -240,19 +228,6 @@
ZYPP_THROW( ParseException( errPrefix( line.lineNo(), "Expected [KEY algorithm checksum filename]", *line ) ) );
}
}
- else if ( key == "LANGUAGE" )
- {
- _pimpl->repoindex().language;
- }
- else if ( key == "LINGUAS" )
- {
- std::setstd::string strval;
- str::split( value, std::inserter( strval, strval.end() ) );
- for ( std::setstd::string::const_iterator it = strval.begin(); it != strval.end(); ++it )
- {
- _pimpl->repoindex().languages.push_back( Locale(*it) );
- }
- }
else if ( key == "META" )
{
if ( _pimpl->setFileCheckSum( _pimpl->repoindex().metaFileChecksums, value ) )
@@ -267,12 +242,10 @@
ZYPP_THROW( ParseException( errPrefix( line.lineNo(), "Expected [algorithm checksum filename]", *line ) ) );
}
}
- else if ( key == "TIMEZONE" )
+ else
{
- _pimpl->repoindex().timezone = value;
- }
- else
- { WAR << errPrefix( line.lineNo(), "Unknown tag", *line ) << endl; }
+ DBG << errPrefix( line.lineNo(), "ignored", *line ) << endl;
+ }
if ( ! ticks.set( input_r.stream().tellg() ) )
Modified: trunk/libzypp/zypp/parser/susetags/RepoIndex.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/RepoIndex.h?rev=11398&r1=11397&r2=11398&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/RepoIndex.h (original)
+++ trunk/libzypp/zypp/parser/susetags/RepoIndex.h Fri Oct 17 18:33:22 2008
@@ -47,15 +47,10 @@
*/
class RepoIndex : public base::ReferenceCounted, private base::NonCopyable
{
+ friend class ContentFileReader;
public:
typedef std::map