We drop it in decompressors, which are the natural next step, so if an
archive is used which isn't worldreadable (= not accessible by _apt) it
doesn't work anyway, so we just fail a bit earlier now and avoid all the
bad things which can happen over file (which could very well still be a
network resourc via NFS mounts or similar stuff, so hardly as safe as
the name might suggest at first).
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 /*{{{*/
// ---------------------------------------------------------------------