Sfoglia il codice sorgente

cherry pick -r1847 from bzr+ssh://bazaar.launchpad.net/~mvo/apt/lp346386/

Michael Vogt 14 anni fa
parent
commit
fe5804fc50

+ 1 - 2
apt-pkg/acquire-item.cc

@@ -1241,8 +1241,7 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long long Size,string Hash,	/
          // if we expect a ClearTextSignature (InRelase), ensure that
          // this is what we get and if not fail to queue a 
          // Release/Release.gpg, see #346386
-         if (SigFile == DestFile && 
-             !IsPgpClearTextSignature(DestFile))
+         if (SigFile == DestFile && !StartsWithGPGClearTextSignature(DestFile))
          {
             Failed(Message, Cfg);
             return;

+ 2 - 2
apt-pkg/contrib/fileutl.cc

@@ -852,10 +852,10 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap)
 }
 									/*}}}*/
 
-// IsPgpClearTextSignature - Check if a file is Pgp/GPG clearsigned     /*{{{*/
+// StartsWithGPGClearTextSignature - Check if a file is Pgp/GPG clearsigned     /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-bool IsPgpClearTextSignature(string const &FileName)
+bool StartsWithGPGClearTextSignature(string const &FileName)
 {
    static const char* SIGMSG = "-----BEGIN PGP SIGNED MESSAGE-----\n";
    char buffer[strlen(SIGMSG)+1];

+ 1 - 1
apt-pkg/contrib/fileutl.h

@@ -181,7 +181,7 @@ pid_t ExecFork();
 bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
 
 // check if the given file starts with a PGP cleartext signature
-bool IsPgpClearTextSignature(std::string const &FileName);
+bool StartsWithGPGClearTextSignature(std::string const &FileName);
 
 // File string manipulators
 std::string flNotDir(std::string File);

+ 1 - 1
apt-pkg/indexcopy.cc

@@ -652,7 +652,7 @@ bool SigVerify::RunGPGV(std::string const &File, std::string const &FileGPG,
       if (gpg == NULL)
 	 return _error->Errno("RunGPGV", _("Could not open file %s"), File.c_str());
       fclose(gpg);
-      if (!IsPgpClearTextSignature(File))
+      if (!StartsWithGPGClearTextSignature(File))
 	 return _error->Error(_("File %s doesn't start with a clearsigned message"), File.c_str());
    }