]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-method.cc
Rename DropPrivs() to DropPrivileges()
[apt.git] / apt-pkg / acquire-method.cc
index e4a937d1dd6de8b363998a43b24abaf48e3a2a0a..d116994e64ed61937bfa3ac0b43618ab6b6f3172 100644 (file)
@@ -118,6 +118,18 @@ void pkgAcqMethod::Fail(string Err,bool Transient)
 
    std::cout << "\n" << std::flush;
 }
+                                                                       /*}}}*/
+// AcqMethod::DropPrivsOrDie - Drop privileges or die          /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgAcqMethod::DropPrivsOrDie()
+{
+   if (!DropPrivileges()) {
+      Fail(false);
+      exit(112);       /* call the european emergency number */
+   }
+}
+
                                                                        /*}}}*/
 // AcqMethod::URIStart - Indicate a download is starting               /*{{{*/
 // ---------------------------------------------------------------------