diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-09-25 12:33:26 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-09-25 12:33:26 +0200 |
commit | e31a89e668596ea86c8f3a08429cd2f48286e734 (patch) | |
tree | 417a694cc8dea17a352c2534f6a9e1f7b23178c6 /apt-pkg/acquire-method.cc | |
parent | 03bfbc965443393b92b2d6d82613472fa3a5067f (diff) | |
parent | 47d278dc7184606f751d015689e0c49eccde4547 (diff) |
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Diffstat (limited to 'apt-pkg/acquire-method.cc')
-rw-r--r-- | apt-pkg/acquire-method.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index e4a937d1d..82f2fb3ce 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -119,6 +119,18 @@ void pkgAcqMethod::Fail(string Err,bool Transient) std::cout << "\n" << std::flush; } /*}}}*/ +// AcqMethod::DropPrivsOrDie - Drop privileges or die /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void pkgAcqMethod::DropPrivsOrDie() +{ + if (!DropPrivs()) { + Fail(false); + exit(112); /* call the european emergency number */ + } +} + + /*}}}*/ // AcqMethod::URIStart - Indicate a download is starting /*{{{*/ // --------------------------------------------------------------------- /* */ |