summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-25 12:33:26 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-25 12:33:26 +0200
commite31a89e668596ea86c8f3a08429cd2f48286e734 (patch)
tree417a694cc8dea17a352c2534f6a9e1f7b23178c6 /methods
parent03bfbc965443393b92b2d6d82613472fa3a5067f (diff)
parent47d278dc7184606f751d015689e0c49eccde4547 (diff)
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Diffstat (limited to 'methods')
-rw-r--r--methods/copy.cc2
-rw-r--r--methods/ftp.cc3
-rw-r--r--methods/gpgv.cc5
-rw-r--r--methods/gzip.cc3
-rw-r--r--methods/http_main.cc5
-rw-r--r--methods/https.cc2
6 files changed, 18 insertions, 2 deletions
diff --git a/methods/copy.cc b/methods/copy.cc
index 30a3f4a51..faf330ace 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -127,5 +127,7 @@ int main()
setlocale(LC_ALL, "");
CopyMethod Mth;
+
+ Mth.DropPrivsOrDie();
return Mth.Run();
}
diff --git a/methods/ftp.cc b/methods/ftp.cc
index 66787a7be..a658b5657 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -1131,6 +1131,9 @@ int main(int, const char *argv[])
}
FtpMethod Mth;
+
+ // no more active ftp, sorry
+ Mth.DropPrivsOrDie();
return Mth.Run();
}
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 30fd217bd..72e4c7987 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -5,6 +5,7 @@
#include <apt-pkg/error.h>
#include <apt-pkg/gpgv.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
#include <ctype.h>
#include <errno.h>
@@ -261,8 +262,10 @@ bool GPGVMethod::Fetch(FetchItem *Itm)
int main()
{
setlocale(LC_ALL, "");
-
+
GPGVMethod Mth;
+ Mth.DropPrivsOrDie();
+
return Mth.Run();
}
diff --git a/methods/gzip.cc b/methods/gzip.cc
index df3f8828f..7ffcda60f 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -139,5 +139,8 @@ int main(int, char *argv[])
++Prog;
GzipMethod Mth;
+
+ Mth.DropPrivsOrDie();
+
return Mth.Run();
}
diff --git a/methods/http_main.cc b/methods/http_main.cc
index 3b346a514..f21a5709c 100644
--- a/methods/http_main.cc
+++ b/methods/http_main.cc
@@ -1,5 +1,6 @@
#include <config.h>
-
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/error.h>
#include <signal.h>
#include "http.h"
@@ -13,5 +14,7 @@ int main()
signal(SIGPIPE, SIG_IGN);
HttpMethod Mth;
+
+ Mth.DropPrivsOrDie();
return Mth.Loop();
}
diff --git a/methods/https.cc b/methods/https.cc
index 0499af0c5..a74d2a38b 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -446,6 +446,8 @@ int main()
HttpsMethod Mth;
curl_global_init(CURL_GLOBAL_SSL) ;
+ Mth.DropPrivsOrDie();
+
return Mth.Run();
}