~l3on/ubuntu/lucid/apt/fix-917845

« back to all changes in this revision

Viewing changes to ftparchive/writer.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2011-11-22 13:56:02 UTC
  • mfrom: (104.1.9 lucid-proposed)
  • Revision ID: package-import@ubuntu.com-20111122135602-scxagfxmbpajhgvi
Tags: 0.7.25.3ubuntu9.9
* SECURITY UPDATE: sensitive information disclosure via incorrect
  hostname validation (LP: #868353)
  - methods/https.cc: properly set CURLOPT_SSL_VERIFYHOST.
  - CVE-2011-3634
* SECURITY UPDATE: Restore apt-ket net-update functionality (LP: #857472)
  - cmdline/apt-key: improve key validation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <iostream>
20
20
#include <vector>
21
21
#include <map>
 
22
#include <set>
22
23
 
23
24
#include "cachedb.h"
 
25
#include "multicompress.h"
24
26
#include "override.h"
25
27
#include "apt-ftparchive.h"
26
28
 
72
74
   FTWScanner(string const &Arch = string());
73
75
};
74
76
 
 
77
class TranslationWriter
 
78
{
 
79
   MultiCompress *Comp;
 
80
   FILE *Output;
 
81
   std::set<string> Included;
 
82
   unsigned short RefCounter;
 
83
 
 
84
   public:
 
85
   void IncreaseRefCounter() { ++RefCounter; };
 
86
   unsigned short DecreaseRefCounter() { return (RefCounter == 0) ? 0 : --RefCounter; };
 
87
   unsigned short GetRefCounter() const { return RefCounter; };
 
88
   bool DoPackage(string const &Pkg, string const &Desc, string const &MD5);
 
89
 
 
90
   TranslationWriter(string const &File, string const &TransCompress, mode_t const &Permissions);
 
91
   TranslationWriter() : Comp(NULL), Output(NULL), RefCounter(0) {};
 
92
   ~TranslationWriter();
 
93
};
 
94
 
75
95
class PackagesWriter : public FTWScanner
76
96
{
77
97
   Override Over;
92
112
   string DirStrip;
93
113
   FILE *Output;
94
114
   struct CacheDB::Stats &Stats;
 
115
   TranslationWriter *TransWriter;
95
116
 
96
117
   inline bool ReadOverride(string File) {return Over.ReadOverride(File);};
97
118
   inline bool ReadExtraOverride(string File)