summaryrefslogtreecommitdiff
path: root/methods/gzip.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/gzip.cc
parentf1e3c8f002be54617656fc4ca525c3f1e57323f3 (diff)
methods: Fail if we cannot drop privileges
Diffstat (limited to 'methods/gzip.cc')
-rw-r--r--methods/gzip.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/methods/gzip.cc b/methods/gzip.cc
index 518e58f82..7ffcda60f 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -135,11 +135,12 @@ int main(int, char *argv[])
{
setlocale(LC_ALL, "");
- DropPrivs();
-
Prog = strrchr(argv[0],'/');
++Prog;
GzipMethod Mth;
+
+ Mth.DropPrivsOrDie();
+
return Mth.Run();
}