X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/67c3067f1a615fd6ff0b332c2a526d052442913d..84b286f65c55e21b4734a17474f1cba464cbbd9c:/methods/ftp.cc diff --git a/methods/ftp.cc b/methods/ftp.cc index 5a87ded1c..ac76295f0 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -23,7 +23,11 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -42,6 +46,7 @@ #include "rfc2553emu.h" #include "connect.h" #include "ftp.h" + #include /*}}}*/ @@ -70,9 +75,10 @@ time_t FtpMethod::FailTime = 0; // FTPConn::FTPConn - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -FTPConn::FTPConn(URI Srv) : Len(0), ServerFd(-1), DataFd(-1), +FTPConn::FTPConn(URI Srv) : Len(0), ServerFd(-1), DataFd(-1), DataListenFd(-1), ServerName(Srv), - ForceExtended(false), TryPassive(true) + ForceExtended(false), TryPassive(true), + PeerAddrLen(0), ServerAddrLen(0) { Debug = _config->FindB("Debug::Acquire::Ftp",false); PasvAddr = 0; @@ -1098,7 +1104,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) } /*}}}*/ -int main(int argc,const char *argv[]) +int main(int, const char *argv[]) { setlocale(LC_ALL, ""); @@ -1126,6 +1132,9 @@ int main(int argc,const char *argv[]) } FtpMethod Mth; + + // no more active ftp, sorry + Mth.DropPrivsOrDie(); return Mth.Run(); }