commit
e310b2e899
@ -1,2 +1,3 @@
|
||||
/p7zip_9.13_src_all-norar.tar.bz2
|
||||
/p7zip_9.20.1_src_all-norar.tar.bz2
|
||||
/p7zip_15.09_src_all-norar.tar.bz2
|
||||
|
@ -0,0 +1,290 @@
|
||||
Author: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Tue, 19 May 2015 02:38:40 +0100
|
||||
Description: Delay creation of symlinks to prevent arbitrary file writes (CVE-2015-1038)
|
||||
Bug: http://sourceforge.net/p/p7zip/bugs/147/
|
||||
Bug-Debian: https://bugs.debian.org/774660
|
||||
|
||||
Alexander Cherepanov discovered that 7zip is susceptible to a
|
||||
directory traversal vulnerability. While extracting an archive, it
|
||||
will extract symlinks and then follow them if they are referenced in
|
||||
further entries. This can be exploited by a rogue archive to write
|
||||
files outside the current directory.
|
||||
|
||||
We have to create placeholder files (which we already do) and delay
|
||||
creating symlinks until the end of extraction.
|
||||
|
||||
Due to the possibility of anti-items (deletions) in the archive, it is
|
||||
possible for placeholders to be deleted and replaced before we create
|
||||
the symlinks. It's not clear that this can be used for mischief, but
|
||||
GNU tar guards against similar problems by checking that the placeholder
|
||||
still exists and is the same inode. XXX It also checks 'birth time' but
|
||||
this isn't portable. We can probably get away with comparing ctime
|
||||
since we don't support hard links.
|
||||
|
||||
diff -rup p7zip_15.09.orig/CPP/7zip/UI/Agent/Agent.cpp p7zip_15.09/CPP/7zip/UI/Agent/Agent.cpp
|
||||
--- p7zip_15.09.orig/CPP/7zip/UI/Agent/Agent.cpp 2015-09-17 20:02:35.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/UI/Agent/Agent.cpp 2015-12-03 02:22:47.073724194 +0000
|
||||
@@ -1515,7 +1515,7 @@ STDMETHODIMP CAgentFolder::Extract(const
|
||||
HRESULT result = _agentSpec->GetArchive()->Extract(&realIndices.Front(),
|
||||
realIndices.Size(), testMode, extractCallback);
|
||||
if (result == S_OK)
|
||||
- result = extractCallbackSpec->SetDirsTimes();
|
||||
+ result = extractCallbackSpec->SetFinalAttribs();
|
||||
return result;
|
||||
COM_TRY_END
|
||||
}
|
||||
diff -rup p7zip_15.09.orig/CPP/7zip/UI/Client7z/Client7z.cpp p7zip_15.09/CPP/7zip/UI/Client7z/Client7z.cpp
|
||||
--- p7zip_15.09.orig/CPP/7zip/UI/Client7z/Client7z.cpp 2015-10-17 15:52:30.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/UI/Client7z/Client7z.cpp 2015-12-03 02:22:47.073724194 +0000
|
||||
@@ -230,8 +230,11 @@ private:
|
||||
COutFileStream *_outFileStreamSpec;
|
||||
CMyComPtr<ISequentialOutStream> _outFileStream;
|
||||
|
||||
+ CObjectVector<NWindows::NFile::NDir::CDelayedSymLink> _delayedSymLinks;
|
||||
+
|
||||
public:
|
||||
void Init(IInArchive *archiveHandler, const FString &directoryPath);
|
||||
+ HRESULT SetFinalAttribs();
|
||||
|
||||
UInt64 NumErrors;
|
||||
bool PasswordIsDefined;
|
||||
@@ -449,11 +452,23 @@ STDMETHODIMP CArchiveExtractCallback::Se
|
||||
}
|
||||
_outFileStream.Release();
|
||||
if (_extractMode && _processedFileInfo.AttribDefined)
|
||||
- SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib);
|
||||
+ SetFileAttrib(_diskFilePath, _processedFileInfo.Attrib, &_delayedSymLinks);
|
||||
PrintNewLine();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+HRESULT CArchiveExtractCallback::SetFinalAttribs()
|
||||
+{
|
||||
+ HRESULT result = S_OK;
|
||||
+
|
||||
+ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
|
||||
+ if (!_delayedSymLinks[i].Create())
|
||||
+ result = E_FAIL;
|
||||
+
|
||||
+ _delayedSymLinks.Clear();
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
|
||||
STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
|
||||
{
|
||||
@@ -914,6 +929,8 @@ int MY_CDECL main(int numArgs, const cha
|
||||
// extractCallbackSpec->PasswordIsDefined = true;
|
||||
// extractCallbackSpec->Password = L"1";
|
||||
HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback);
|
||||
+ if (result == S_OK)
|
||||
+ result = extractCallbackSpec->SetFinalAttribs();
|
||||
if (result != S_OK)
|
||||
{
|
||||
PrintError("Extract Error");
|
||||
diff -rup p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
|
||||
--- p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp 2015-10-03 09:49:15.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp 2015-12-03 02:24:40.444963545 +0000
|
||||
@@ -1502,7 +1502,7 @@ STDMETHODIMP CArchiveExtractCallback::Se
|
||||
NumFiles++;
|
||||
|
||||
if (!_stdOutMode && _extractMode && _fi.AttribDefined)
|
||||
- SetFileAttrib(_diskFilePath, _fi.Attrib);
|
||||
+ SetFileAttrib(_diskFilePath, _fi.Attrib, &_delayedSymLinks);
|
||||
|
||||
RINOK(_extractCallback2->SetOperationResult(opRes, BoolToInt(_encrypted)));
|
||||
|
||||
@@ -1584,8 +1584,9 @@ static unsigned GetNumSlashes(const FCha
|
||||
}
|
||||
}
|
||||
|
||||
-HRESULT CArchiveExtractCallback::SetDirsTimes()
|
||||
+HRESULT CArchiveExtractCallback::SetFinalAttribs()
|
||||
{
|
||||
+ HRESULT result = S_OK;
|
||||
CRecordVector<CExtrRefSortPair> pairs;
|
||||
pairs.ClearAndSetSize(_extractedFolderPaths.Size());
|
||||
unsigned i;
|
||||
@@ -1622,5 +1623,12 @@ HRESULT CArchiveExtractCallback::SetDirs
|
||||
(WriteATime && ATimeDefined) ? &ATime : NULL,
|
||||
(WriteMTime && MTimeDefined) ? &MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL));
|
||||
}
|
||||
- return S_OK;
|
||||
+
|
||||
+ for (int i = 0; i != _delayedSymLinks.Size(); ++i)
|
||||
+ if (!_delayedSymLinks[i].Create())
|
||||
+ result = E_FAIL;
|
||||
+
|
||||
+ _delayedSymLinks.Clear();
|
||||
+
|
||||
+ return result;
|
||||
}
|
||||
diff -rup p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.h p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.h
|
||||
--- p7zip_15.09.orig/CPP/7zip/UI/Common/ArchiveExtractCallback.h 2015-10-03 11:29:09.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/UI/Common/ArchiveExtractCallback.h 2015-12-03 02:22:47.074724204 +0000
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "../../../Common/MyCom.h"
|
||||
#include "../../../Common/Wildcard.h"
|
||||
|
||||
+#include "../../../Windows/FileDir.h"
|
||||
+
|
||||
#include "../../IPassword.h"
|
||||
|
||||
#include "../../Common/FileStreams.h"
|
||||
@@ -237,6 +239,8 @@ class CArchiveExtractCallback:
|
||||
bool _saclEnabled;
|
||||
#endif
|
||||
|
||||
+ CObjectVector<NWindows::NFile::NDir::CDelayedSymLink> _delayedSymLinks;
|
||||
+
|
||||
void CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath);
|
||||
HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined);
|
||||
HRESULT GetUnpackSize();
|
||||
@@ -330,7 +334,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
- HRESULT SetDirsTimes();
|
||||
+ HRESULT SetFinalAttribs();
|
||||
};
|
||||
|
||||
bool CensorNode_CheckPath(const NWildcard::CCensorNode &node, const CReadArcItem &item);
|
||||
diff -rup p7zip_15.09.orig/CPP/7zip/UI/Common/Extract.cpp p7zip_15.09/CPP/7zip/UI/Common/Extract.cpp
|
||||
--- p7zip_15.09.orig/CPP/7zip/UI/Common/Extract.cpp 2015-09-07 20:47:32.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/UI/Common/Extract.cpp 2015-12-03 02:22:47.075724215 +0000
|
||||
@@ -207,7 +207,7 @@ static HRESULT DecompressArchive(
|
||||
else
|
||||
result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, ecs);
|
||||
if (result == S_OK && !options.StdInMode)
|
||||
- result = ecs->SetDirsTimes();
|
||||
+ result = ecs->SetFinalAttribs();
|
||||
return callback->ExtractResult(result);
|
||||
}
|
||||
|
||||
diff -rup p7zip_15.09.orig/CPP/Windows/FileDir.cpp p7zip_15.09/CPP/Windows/FileDir.cpp
|
||||
--- p7zip_15.09.orig/CPP/Windows/FileDir.cpp 2015-10-10 13:37:41.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/Windows/FileDir.cpp 2015-12-03 02:22:47.075724215 +0000
|
||||
@@ -347,7 +347,8 @@ static int convert_to_symlink(const char
|
||||
return -1;
|
||||
}
|
||||
|
||||
-bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes)
|
||||
+bool SetFileAttrib(CFSTR fileName, DWORD fileAttributes,
|
||||
+ CObjectVector<CDelayedSymLink> *delayedSymLinks)
|
||||
{
|
||||
if (!fileName) {
|
||||
SetLastError(ERROR_PATH_NOT_FOUND);
|
||||
@@ -379,7 +380,9 @@ bool SetFileAttrib(CFSTR fileName, DWORD
|
||||
stat_info.st_mode = fileAttributes >> 16;
|
||||
#ifdef ENV_HAVE_LSTAT
|
||||
if (S_ISLNK(stat_info.st_mode)) {
|
||||
- if ( convert_to_symlink(name) != 0) {
|
||||
+ if (delayedSymLinks)
|
||||
+ delayedSymLinks->Add(CDelayedSymLink(name));
|
||||
+ else if ( convert_to_symlink(name) != 0) {
|
||||
TRACEN((printf("SetFileAttrib(%s,%d) : false-3\n",(const char *)name,fileAttributes)))
|
||||
return false;
|
||||
}
|
||||
@@ -814,6 +817,43 @@ bool CTempDir::Remove()
|
||||
return !_mustBeDeleted;
|
||||
}
|
||||
|
||||
+#ifdef ENV_UNIX
|
||||
+
|
||||
+CDelayedSymLink::CDelayedSymLink(const char * source)
|
||||
+ : _source(source)
|
||||
+{
|
||||
+ struct stat st;
|
||||
+
|
||||
+ if (lstat(_source, &st) == 0) {
|
||||
+ _dev = st.st_dev;
|
||||
+ _ino = st.st_ino;
|
||||
+ } else {
|
||||
+ _dev = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+bool CDelayedSymLink::Create()
|
||||
+{
|
||||
+ struct stat st;
|
||||
+
|
||||
+ if (_dev == 0) {
|
||||
+ errno = EPERM;
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (lstat(_source, &st) != 0)
|
||||
+ return false;
|
||||
+ if (_dev != st.st_dev || _ino != st.st_ino) {
|
||||
+ // Placeholder file has been overwritten or moved by another
|
||||
+ // symbolic link creation
|
||||
+ errno = EPERM;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return convert_to_symlink(_source) == 0;
|
||||
+}
|
||||
+
|
||||
+#endif // ENV_UNIX
|
||||
+
|
||||
}}}
|
||||
|
||||
#ifndef _SFX
|
||||
diff -rup p7zip_15.09.orig/CPP/Windows/FileDir.h p7zip_15.09/CPP/Windows/FileDir.h
|
||||
--- p7zip_15.09.orig/CPP/Windows/FileDir.h 2015-06-19 11:52:06.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/Windows/FileDir.h 2015-12-03 02:22:47.075724215 +0000
|
||||
@@ -4,6 +4,7 @@
|
||||
#define __WINDOWS_FILE_DIR_H
|
||||
|
||||
#include "../Common/MyString.h"
|
||||
+#include "../Common/MyVector.h"
|
||||
|
||||
#include "FileIO.h"
|
||||
|
||||
@@ -11,11 +12,14 @@ namespace NWindows {
|
||||
namespace NFile {
|
||||
namespace NDir {
|
||||
|
||||
+class CDelayedSymLink;
|
||||
+
|
||||
bool GetWindowsDir(FString &path);
|
||||
bool GetSystemDir(FString &path);
|
||||
|
||||
bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
|
||||
-bool SetFileAttrib(CFSTR path, DWORD attrib);
|
||||
+bool SetFileAttrib(CFSTR path, DWORD attrib,
|
||||
+ CObjectVector<CDelayedSymLink> *delayedSymLinks = 0);
|
||||
bool MyMoveFile(CFSTR existFileName, CFSTR newFileName);
|
||||
|
||||
#ifndef UNDER_CE
|
||||
@@ -76,6 +80,31 @@ public:
|
||||
bool Remove();
|
||||
};
|
||||
|
||||
+// Symbolic links must be created last so that they can't be used to
|
||||
+// create or overwrite files above the extraction directory.
|
||||
+class CDelayedSymLink
|
||||
+{
|
||||
+#ifdef ENV_UNIX
|
||||
+ // Where the symlink should be created. The target is specified in
|
||||
+ // the placeholder file.
|
||||
+ AString _source;
|
||||
+
|
||||
+ // Device and inode of the placeholder file. Before creating the
|
||||
+ // symlink, we must check that these haven't been changed by creation
|
||||
+ // of another symlink.
|
||||
+ dev_t _dev;
|
||||
+ ino_t _ino;
|
||||
+
|
||||
+public:
|
||||
+ explicit CDelayedSymLink(const char * source);
|
||||
+ bool Create();
|
||||
+#else // !ENV_UNIX
|
||||
+public:
|
||||
+ CDelayedSymLink(const char * source) {}
|
||||
+ bool Create() { return true; }
|
||||
+#endif // ENV_UNIX
|
||||
+};
|
||||
+
|
||||
#if !defined(UNDER_CE)
|
||||
class CCurrentDirRestorer
|
||||
{
|
@ -0,0 +1,148 @@
|
||||
diff -rup p7zip_15.09.orig/CPP/7zip/CMAKE/generate.sh p7zip_15.09/CPP/7zip/CMAKE/generate.sh
|
||||
--- p7zip_15.09.orig/CPP/7zip/CMAKE/generate.sh 2015-01-18 17:14:54.000000000 +0000
|
||||
+++ p7zip_15.09/CPP/7zip/CMAKE/generate.sh 2015-11-05 03:55:11.789432894 +0000
|
||||
@@ -15,14 +15,14 @@ CURDIR=$PWD
|
||||
cd $CURDIR
|
||||
doit "Unix" "Unix Makefiles"
|
||||
|
||||
-cd $CURDIR
|
||||
-doit "codeblocks" "CodeBlocks - Unix Makefiles"
|
||||
+#cd $CURDIR
|
||||
+#doit "codeblocks" "CodeBlocks - Unix Makefiles"
|
||||
|
||||
#cd $CURDIR
|
||||
#doit "KDevelop3" "KDevelop3"
|
||||
|
||||
-cd $CURDIR
|
||||
-doit "EclipseCDT4" "Eclipse CDT4 - Unix Makefiles"
|
||||
+#cd $CURDIR
|
||||
+#doit "EclipseCDT4" "Eclipse CDT4 - Unix Makefiles"
|
||||
|
||||
#cd $CURDIR
|
||||
#doit "ninja" "Ninja"
|
||||
diff -rup p7zip_15.09.orig/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt p7zip_15.09/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt
|
||||
--- p7zip_15.09.orig/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt 2015-10-10 13:30:03.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt 2015-11-05 04:21:50.386888680 +0000
|
||||
@@ -127,8 +127,6 @@ add_library(7z MODULE
|
||||
"../../../../CPP/7zip/Archive/PeHandler.cpp"
|
||||
"../../../../CPP/7zip/Archive/PpmdHandler.cpp"
|
||||
"../../../../CPP/7zip/Archive/QcowHandler.cpp"
|
||||
- "../../../../CPP/7zip/Archive/Rar/RarHandler.cpp"
|
||||
- "../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp"
|
||||
"../../../../CPP/7zip/Archive/RpmHandler.cpp"
|
||||
"../../../../CPP/7zip/Archive/SplitHandler.cpp"
|
||||
"../../../../CPP/7zip/Archive/SquashfsHandler.cpp"
|
||||
@@ -231,9 +229,6 @@ add_library(7z MODULE
|
||||
"../../../../CPP/7zip/Crypto/MyAesReg.cpp"
|
||||
"../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp"
|
||||
"../../../../CPP/7zip/Crypto/RandGen.cpp"
|
||||
- "../../../../CPP/7zip/Crypto/Rar20Crypto.cpp"
|
||||
- "../../../../CPP/7zip/Crypto/Rar5Aes.cpp"
|
||||
- "../../../../CPP/7zip/Crypto/RarAes.cpp"
|
||||
"../../../../CPP/7zip/Crypto/WzAes.cpp"
|
||||
"../../../../CPP/7zip/Crypto/ZipCrypto.cpp"
|
||||
"../../../../CPP/7zip/Crypto/ZipStrong.cpp"
|
||||
--- p7zip_15.09.orig/CPP/7zip/Bundles/Format7zFree/makefile.list 2015-10-10 13:30:03.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/Bundles/Format7zFree/makefile.list 2015-11-05 13:22:50.715659911 +0000
|
||||
@@ -89,8 +89,6 @@ SRCS=\
|
||||
../../../../CPP/7zip/Archive/PeHandler.cpp \
|
||||
../../../../CPP/7zip/Archive/PpmdHandler.cpp \
|
||||
../../../../CPP/7zip/Archive/QcowHandler.cpp \
|
||||
- ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp \
|
||||
- ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp \
|
||||
../../../../CPP/7zip/Archive/RpmHandler.cpp \
|
||||
../../../../CPP/7zip/Archive/SplitHandler.cpp \
|
||||
../../../../CPP/7zip/Archive/SquashfsHandler.cpp \
|
||||
@@ -193,9 +191,6 @@ SRCS=\
|
||||
../../../../CPP/7zip/Crypto/MyAesReg.cpp \
|
||||
../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp \
|
||||
../../../../CPP/7zip/Crypto/RandGen.cpp \
|
||||
- ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp \
|
||||
- ../../../../CPP/7zip/Crypto/Rar5Aes.cpp \
|
||||
- ../../../../CPP/7zip/Crypto/RarAes.cpp \
|
||||
../../../../CPP/7zip/Crypto/WzAes.cpp \
|
||||
../../../../CPP/7zip/Crypto/ZipCrypto.cpp \
|
||||
../../../../CPP/7zip/Crypto/ZipStrong.cpp \
|
||||
@@ -491,10 +486,6 @@ PpmdHandler.o : ../../../../CPP/7zip/Arc
|
||||
$(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/PpmdHandler.cpp
|
||||
QcowHandler.o : ../../../../CPP/7zip/Archive/QcowHandler.cpp
|
||||
$(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/QcowHandler.cpp
|
||||
-RarHandler.o : ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp
|
||||
- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp
|
||||
-Rar5Handler.o : ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp
|
||||
- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp
|
||||
RpmHandler.o : ../../../../CPP/7zip/Archive/RpmHandler.cpp
|
||||
$(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/RpmHandler.cpp
|
||||
SplitHandler.o : ../../../../CPP/7zip/Archive/SplitHandler.cpp
|
||||
@@ -699,12 +690,6 @@ Pbkdf2HmacSha1.o : ../../../../CPP/7zip/
|
||||
$(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp
|
||||
RandGen.o : ../../../../CPP/7zip/Crypto/RandGen.cpp
|
||||
$(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/RandGen.cpp
|
||||
-Rar20Crypto.o : ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp
|
||||
- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp
|
||||
-Rar5Aes.o : ../../../../CPP/7zip/Crypto/Rar5Aes.cpp
|
||||
- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Rar5Aes.cpp
|
||||
-RarAes.o : ../../../../CPP/7zip/Crypto/RarAes.cpp
|
||||
- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/RarAes.cpp
|
||||
WzAes.o : ../../../../CPP/7zip/Crypto/WzAes.cpp
|
||||
$(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/WzAes.cpp
|
||||
ZipCrypto.o : ../../../../CPP/7zip/Crypto/ZipCrypto.cpp
|
||||
@@ -877,8 +862,6 @@ OBJS=\
|
||||
PeHandler.o \
|
||||
PpmdHandler.o \
|
||||
QcowHandler.o \
|
||||
- RarHandler.o \
|
||||
- Rar5Handler.o \
|
||||
RpmHandler.o \
|
||||
SplitHandler.o \
|
||||
SquashfsHandler.o \
|
||||
@@ -981,9 +964,6 @@ OBJS=\
|
||||
MyAesReg.o \
|
||||
Pbkdf2HmacSha1.o \
|
||||
RandGen.o \
|
||||
- Rar20Crypto.o \
|
||||
- Rar5Aes.o \
|
||||
- RarAes.o \
|
||||
WzAes.o \
|
||||
ZipCrypto.o \
|
||||
ZipStrong.o \
|
||||
--- p7zip_15.09.orig/makefile 2015-10-05 09:39:57.000000000 +0100
|
||||
+++ p7zip_15.09/makefile 2015-11-05 13:36:01.160793573 +0000
|
||||
@@ -70,7 +70,6 @@ depend:
|
||||
$(MAKE) -C CPP/7zip/UI/Client7z depend
|
||||
$(MAKE) -C CPP/7zip/UI/Console depend
|
||||
$(MAKE) -C CPP/7zip/Bundles/Format7zFree depend
|
||||
- $(MAKE) -C CPP/7zip/Compress/Rar depend
|
||||
$(MAKE) -C CPP/7zip/UI/GUI depend
|
||||
$(MAKE) -C CPP/7zip/UI/FileManager depend
|
||||
|
||||
@@ -81,7 +80,6 @@ sfx: common
|
||||
common7z:common
|
||||
$(MKDIR) bin/Codecs
|
||||
$(MAKE) -C CPP/7zip/Bundles/Format7zFree all
|
||||
- $(MAKE) -C CPP/7zip/Compress/Rar all
|
||||
|
||||
7z: common7z
|
||||
$(MAKE) -C CPP/7zip/UI/Console all
|
||||
@@ -106,7 +104,6 @@ clean:
|
||||
$(MAKE) -C CPP/7zip/UI/FileManager clean
|
||||
$(MAKE) -C CPP/7zip/UI/GUI clean
|
||||
$(MAKE) -C CPP/7zip/Bundles/Format7zFree clean
|
||||
- $(MAKE) -C CPP/7zip/Compress/Rar clean
|
||||
$(MAKE) -C CPP/7zip/Bundles/LzmaCon clean2
|
||||
$(MAKE) -C CPP/7zip/Bundles/AloneGCOV clean
|
||||
$(MAKE) -C CPP/7zip/TEST/TestUI clean
|
||||
--- p7zip_15.09.orig/CPP/7zip/CMAKE/CMakeLists.txt 2015-06-21 20:53:26.000000000 +0100
|
||||
+++ p7zip_15.09/CPP/7zip/CMAKE/CMakeLists.txt 2015-11-05 14:35:42.849613481 +0000
|
||||
@@ -27,9 +27,9 @@ add_subdirectory(7za)
|
||||
|
||||
add_subdirectory(7z_)
|
||||
|
||||
-add_subdirectory(7zG)
|
||||
+#add_subdirectory(7zG)
|
||||
|
||||
-add_subdirectory(7zFM)
|
||||
+#add_subdirectory(7zFM)
|
||||
|
||||
add_subdirectory(7zr)
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- p7zip_15.09.orig/C/CpuArch.h 2015-09-27 15:31:20.000000000 -0400
|
||||
+++ p7zip_15.09/C/CpuArch.h 2015-12-01 06:16:38.000000000 -0500
|
||||
@@ -77,7 +77,7 @@
|
||||
|| defined(__MIPSEB) \
|
||||
|| defined(_MIPSEB) \
|
||||
|| defined(__m68k__) \
|
||||
- || defined(__s390x__)
|
||||
+ || defined(__s390__)
|
||||
#define MY_CPU_BE
|
||||
#endif
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff -Naupr p7zip_9.20.1.orig/Asm/x64/7zCrcT8U.asm p7zip_9.20.1/Asm/x64/7zCrcT8U.asm
|
||||
--- p7zip_9.20.1.orig/Asm/x64/7zCrcT8U.asm 2008-08-14 11:18:07.000000000 +0200
|
||||
+++ p7zip_9.20.1/Asm/x64/7zCrcT8U.asm 2011-07-26 17:43:57.727910278 +0200
|
||||
@@ -101,3 +101,8 @@ _CrcUpdateT8:
|
||||
ret
|
||||
|
||||
end
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__,elf
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+%endif
|
||||
+
|
||||
diff -Naupr p7zip_9.20.1.orig/Asm/x86/7zCrcT8U.asm p7zip_9.20.1/Asm/x86/7zCrcT8U.asm
|
||||
--- p7zip_9.20.1.orig/Asm/x86/7zCrcT8U.asm 2009-07-14 12:44:15.000000000 +0200
|
||||
+++ p7zip_9.20.1/Asm/x86/7zCrcT8U.asm 2011-07-26 17:44:23.938864508 +0200
|
||||
@@ -99,3 +99,8 @@ _CrcUpdateT8:
|
||||
|
||||
|
||||
; end
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__,elf
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+%endif
|
||||
+
|
@ -1,99 +0,0 @@
|
||||
diff -Naupr p7zip_9.20.1.orig/install.sh p7zip_9.20.1/install.sh
|
||||
--- p7zip_9.20.1.orig/install.sh 2011-03-16 20:32:56.000000000 +0100
|
||||
+++ p7zip_9.20.1/install.sh 2011-07-26 14:07:09.609064252 +0200
|
||||
@@ -7,12 +7,10 @@ installShared()
|
||||
then
|
||||
echo "- installing ${DEST_DIR}${DEST_BIN}/${prg}"
|
||||
cp bin/${prg} "${DEST_DIR}${DEST_SHARE}/${prg}"
|
||||
- chmod 777 "${DEST_DIR}${DEST_SHARE}/${prg}"
|
||||
- strip "${DEST_DIR}${DEST_SHARE}/${prg}"
|
||||
- chmod 555 "${DEST_DIR}${DEST_SHARE}/${prg}"
|
||||
+ chmod 755 "${DEST_DIR}${DEST_SHARE}/${prg}"
|
||||
echo "#! /bin/sh" > "${DEST_DIR}${DEST_BIN}/${prg}"
|
||||
echo "\"${DEST_SHARE}/${prg}\" \"\$@\"" >> "${DEST_DIR}${DEST_BIN}/${prg}"
|
||||
- chmod 555 "${DEST_DIR}${DEST_BIN}/${prg}"
|
||||
+ chmod 755 "${DEST_DIR}${DEST_BIN}/${prg}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -117,7 +115,7 @@ else
|
||||
echo "- installing ${DEST_DIR}${DEST_BIN}/7za"
|
||||
mkdir -p "${DEST_DIR}${DEST_BIN}"
|
||||
cp bin/7za "${DEST_DIR}${DEST_BIN}/7za"
|
||||
- chmod 555 "${DEST_DIR}${DEST_BIN}/7za"
|
||||
+ chmod 755 "${DEST_DIR}${DEST_BIN}/7za"
|
||||
fi
|
||||
|
||||
if [ -x bin/7zr ]
|
||||
@@ -125,7 +123,7 @@ else
|
||||
echo "- installing ${DEST_DIR}${DEST_BIN}/7zr"
|
||||
mkdir -p "${DEST_DIR}${DEST_BIN}"
|
||||
cp bin/7zr "${DEST_DIR}${DEST_BIN}/7zr"
|
||||
- chmod 555 "${DEST_DIR}${DEST_BIN}/7zr"
|
||||
+ chmod 755 "${DEST_DIR}${DEST_BIN}/7zr"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -134,27 +132,27 @@ if [ -d DOCS ]
|
||||
then
|
||||
echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7z.1 > "${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
|
||||
echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7za.1 > "${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
|
||||
echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7zr.1 > "${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
else
|
||||
echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
grep -v "{DEST_SHARE_DOC}" man1/7z.1 > "${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7z.1"
|
||||
|
||||
echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
grep -v "{DEST_SHARE_DOC}" man1/7za.1 > "${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7za.1"
|
||||
|
||||
echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
grep -v "{DEST_SHARE_DOC}" man1/7zr.1 > "${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
- chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_MAN}/man1/7zr.1"
|
||||
fi
|
||||
|
||||
if [ -f README ]
|
||||
@@ -162,7 +160,7 @@ then
|
||||
echo "- installing ${DEST_DIR}${DEST_SHARE_DOC}/README"
|
||||
mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}"
|
||||
cp README "${DEST_DIR}${DEST_SHARE_DOC}/README"
|
||||
- chmod 444 "${DEST_DIR}${DEST_SHARE_DOC}/README"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_SHARE_DOC}/README"
|
||||
fi
|
||||
|
||||
if [ -f ChangeLog ]
|
||||
@@ -170,7 +168,7 @@ then
|
||||
echo "- installing ${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog"
|
||||
mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}"
|
||||
cp ChangeLog "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog"
|
||||
- chmod 444 "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog"
|
||||
+ chmod 644 "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog"
|
||||
fi
|
||||
|
||||
if [ -d DOCS ]
|
||||
@@ -178,8 +176,8 @@ then
|
||||
echo "- installing HTML help in ${DEST_DIR}${DEST_SHARE_DOC}/DOCS"
|
||||
mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}"
|
||||
cp -r DOCS "${DEST_DIR}${DEST_SHARE_DOC}/DOCS"
|
||||
- find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type d -exec chmod 555 {} \;
|
||||
- find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type f -exec chmod 444 {} \;
|
||||
+ find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type d -exec chmod 755 {} \;
|
||||
+ find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type f -exec chmod 644 {} \;
|
||||
fi
|
||||
|
||||
use_lang="n"
|
@ -1,24 +0,0 @@
|
||||
diff -Naupr p7zip_9.20.1.orig/makefile.linux_amd64_asm p7zip_9.20.1/makefile.linux_amd64_asm
|
||||
--- p7zip_9.20.1.orig/makefile.linux_amd64_asm 2009-12-22 19:11:03.000000000 +0100
|
||||
+++ p7zip_9.20.1/makefile.linux_amd64_asm 2011-07-26 14:43:58.275086735 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
OPTFLAGS=-O
|
||||
|
||||
# use "-m32" to have a 32bits executable
|
||||
-ALLFLAGS=-m64 ${OPTFLAGS} -pipe -s \
|
||||
+ALLFLAGS=-m64 ${OPTFLAGS} -pipe \
|
||||
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
-DNDEBUG -D_REENTRANT -DENV_UNIX \
|
||||
-D_7ZIP_LARGE_PAGES \
|
||||
diff -Naupr p7zip_9.20.1.orig/makefile.linux_x86_asm_gcc_4.X p7zip_9.20.1/makefile.linux_x86_asm_gcc_4.X
|
||||
--- p7zip_9.20.1.orig/makefile.linux_x86_asm_gcc_4.X 2011-01-11 21:57:50.000000000 +0100
|
||||
+++ p7zip_9.20.1/makefile.linux_x86_asm_gcc_4.X 2011-07-26 14:44:14.945027628 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
OPTFLAGS=-O
|
||||
|
||||
-ALLFLAGS=${OPTFLAGS} -pipe -m32 -s \
|
||||
+ALLFLAGS=${OPTFLAGS} -pipe -m32 \
|
||||
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
-DNDEBUG -D_REENTRANT -DENV_UNIX \
|
||||
-D_7ZIP_LARGE_PAGES \
|
Loading…
Reference in new issue