summaryrefslogtreecommitdiff
path: root/methods/ftp.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2014-09-24 21:49:19 +0200
committerJulian Andres Klode <jak@debian.org>2014-09-24 21:49:19 +0200
commit7b18d5592fd5e0bb173e193d1e6693a66065f971 (patch)
treec7485a668a96e6b644adae4b5f46a78827878d98 /methods/ftp.cc
parentf1e3c8f002be54617656fc4ca525c3f1e57323f3 (diff)
methods: Fail if we cannot drop privileges
Diffstat (limited to 'methods/ftp.cc')
-rw-r--r--methods/ftp.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/methods/ftp.cc b/methods/ftp.cc
index 9d58aa3b9..a658b5657 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -1107,9 +1107,6 @@ int main(int, const char *argv[])
{
setlocale(LC_ALL, "");
- // no more active ftp, sorry
- DropPrivs();
-
/* See if we should be come the http client - we do this for http
proxy urls */
if (getenv("ftp_proxy") != 0)
@@ -1134,6 +1131,9 @@ int main(int, const char *argv[])
}
FtpMethod Mth;
+
+ // no more active ftp, sorry
+ Mth.DropPrivsOrDie();
return Mth.Run();
}