X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d29d27b5513735bdb0f77505f5124b1bed390a17..8d1cb6da6e21302c654da3f09de3975af7e4a11f:/methods/rsh.cc diff --git a/methods/rsh.cc b/methods/rsh.cc index 9d82a99e3..74a908ef7 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -398,6 +397,10 @@ RSHMethod::RSHMethod(std::string const &pProg) : aptMethod(pProg.c_str(),"1.0",S // --------------------------------------------------------------------- bool RSHMethod::Configuration(std::string Message) { + // enabling privilege dropping for this method requires configuration… + // … which is otherwise lifted straight from root, so use it by default. + _config->Set(std::string("Binary::") + Prog + "::APT::Sandbox::User", ""); + if (aptMethod::Configuration(Message) == false) return false; @@ -543,8 +546,5 @@ bool RSHMethod::Fetch(FetchItem *Itm) int main(int, const char *argv[]) { - setlocale(LC_ALL, ""); - - RSHMethod Mth(flNotDir(argv[0])); - return Mth.Run(); + return RSHMethod(flNotDir(argv[0])).Run(); }