]> git.saurik.com Git - apt.git/blobdiff - methods/gzip.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / methods / gzip.cc
index 7ffcda60f66cace2b11fceaad4cbbeb6521fa346..387c05f2ec99304eb0f259bb2b9b28d35a4fa654 100644 (file)
@@ -33,12 +33,22 @@ const char *Prog;
 class GzipMethod : public pkgAcqMethod
 {
    virtual bool Fetch(FetchItem *Itm);
+   virtual bool Configuration(std::string Message);
    
    public:
    
    GzipMethod() : pkgAcqMethod("1.1",SingleInstance | SendConfig) {};
 };
 
+bool GzipMethod::Configuration(std::string Message)
+{
+   if (pkgAcqMethod::Configuration(Message) == false)
+      return false;
+
+   DropPrivsOrDie();
+
+   return true;
+}
 
 // GzipMethod::Fetch - Decompress the passed URI                       /*{{{*/
 // ---------------------------------------------------------------------
@@ -140,7 +150,5 @@ int main(int, char *argv[])
 
    GzipMethod Mth;
 
-   Mth.DropPrivsOrDie();
-
    return Mth.Run();
 }