Przeglądaj źródła

disable privilege dropping for rsh/ssh method by default

ssh expects various configuration bits to be usable like known hosts,
possibly keys and co. Setting this up needs some user work for probably
not a whole lot of benefits, so instead of forcing it upon users on
upgrade disable dropping for it by default.

Closes: 806511
David Kalnischkies 10 lat temu
rodzic
commit
25ff0797da
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      methods/rsh.cc

+ 4 - 0
methods/rsh.cc

@@ -398,6 +398,10 @@ RSHMethod::RSHMethod(std::string const &pProg) : aptMethod(pProg.c_str(),"1.0",S
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 bool RSHMethod::Configuration(std::string Message)
 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)
    if (aptMethod::Configuration(Message) == false)
       return false;
       return false;