]> git.saurik.com Git - apt.git/blobdiff - methods/gpgv.cc
Fix backward compatiblity of the new pkgAcquireMethod::DropPrivsOrDie()
[apt.git] / methods / gpgv.cc
index 7e8500c51b865f74bf230bc9881582f653ee2d8a..488c16826e5c70ea2d45fcdbac8649fe287cb040 100644 (file)
@@ -44,12 +44,22 @@ class GPGVMethod : public pkgAcqMethod
    
    protected:
    virtual bool Fetch(FetchItem *Itm);
-   
+   virtual bool Configuration(string Message);
    public:
    
    GPGVMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig) {};
 };
 
+bool GPGVMethod::Configuration(string Message)
+{
+   if (pkgAcqMethod::Configuration(Message) == false)
+      return false;
+
+   DropPrivsOrDie();
+
+   return true;
+}
+
 string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
                                         vector<string> &GoodSigners,
                                         vector<string> &BadSigners,
@@ -265,7 +275,5 @@ int main()
 
    GPGVMethod Mth;
 
-   Mth.DropPrivsOrDie();
-
    return Mth.Run();
 }