]> git.saurik.com Git - apt.git/blobdiff - methods/file.cc
drop privileges in file:// method as we do for decompressors
[apt.git] / methods / file.cc
index 40e85bce5a464d7fafa1014bfeba8a242cc3aa47..b689de6195c543276987fe7d84ca9e90209bb71a 100644 (file)
 class FileMethod : public pkgAcqMethod
 {
    virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
-   
+   virtual bool Configuration(std::string Message) APT_OVERRIDE;
+
    public:
-   
+
    FileMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig | LocalOnly) {};
 };
+bool FileMethod::Configuration(std::string Message)
+{
+   if (pkgAcqMethod::Configuration(Message) == false)
+      return false;
+
+   DropPrivsOrDie();
+
+   return true;
+}
 
 // FileMethod::Fetch - Fetch a file                                    /*{{{*/
 // ---------------------------------------------------------------------