]> git.saurik.com Git - apt.git/commitdiff
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
authorMichael Vogt <mvo@ubuntu.com>
Thu, 25 Sep 2014 10:33:26 +0000 (12:33 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Thu, 25 Sep 2014 10:33:26 +0000 (12:33 +0200)
1  2 
methods/copy.cc
methods/gpgv.cc

diff --combined methods/copy.cc
index 30a3f4a5197da6a4f8b554c392b53f77ad50f158,3883c822b2417a6f8a72f6a94a84b6f27188f51f..faf330ace57abf56a7b4579f6eae1e036f51bc07
@@@ -70,14 -70,6 +70,14 @@@ bool CopyMethod::Fetch(FetchItem *Itm
     Res.LastModified = Buf.st_mtime;
     Res.IMSHit = false;      
     URIStart(Res);
 +
 +   // when the files are identical, just compute the hashes
 +   if(File == Itm->DestFile)
 +   {
 +      CalculateHashes(Res);
 +      URIDone(Res);
 +      return true;
 +   }
     
     // just calc the hashes if the source and destination are identical
     if (File == Itm->DestFile)
@@@ -127,5 -119,7 +127,7 @@@ int main(
     setlocale(LC_ALL, "");
  
     CopyMethod Mth;
+    Mth.DropPrivsOrDie();
     return Mth.Run();
  }
diff --combined methods/gpgv.cc
index 30fd217bde9a382d709fa034ff366e3ef9a15de2,4071cbac6d76ac5de9e8ce6432deb447f4991c9a..72e4c798706595ee97968f918bb700a64c81a9f4
@@@ -5,6 -5,7 +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>
@@@ -159,7 -160,7 +160,7 @@@ string GPGVMethod::VerifyGetSigners(con
     waitpid(pid, &status, 0);
     if (Debug == true)
     {
 -      std::clog << "gpgv exited\n";
 +      ioprintf(std::clog, "gpgv exited with status %i\n", WEXITSTATUS(status));
     }
     
     if (WEXITSTATUS(status) == 0)
@@@ -261,8 -262,10 +262,10 @@@ bool GPGVMethod::Fetch(FetchItem *Itm
  int main()
  {
     setlocale(LC_ALL, "");
-    
     GPGVMethod Mth;
  
+    Mth.DropPrivsOrDie();
     return Mth.Run();
  }