cosmopolitan/third_party/unzip
Justine Tunney 133c693650 Work around Landlock output inode in compile.com
This change fixes Landlock Make so that only the output target file is
unveiled, rather than unveiling the directory that contains it. This
gives us a much stronger sandbox. It also helped identify problematic
build code in our repo that should have been using o/tmp instead.

Landlock isn't able to let us unveil files that don't exist. Even if
they do, then once a file is deleted, the sandboxing for it goes away.
This caused problems for Landlock Make because tools like GNU LD will
repeatedly delete and recreate the output file. This change uses the
compile.com wrapper to ensure on changes happen to the output inode.

New binary available on https://justine.lol/make/

Fixes #528
2022-08-09 07:55:44 -07:00
..
unix Work around Landlock output inode in compile.com 2022-08-09 07:55:44 -07:00
api.c Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
apihelp.c Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
consts.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
crc32.c Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
crc32.h Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
crypt.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
crypt.h Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
ebcdic.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
envargs.c Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
explode.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
extract.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
fileio.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
globals.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
globals.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
inflate.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
inflate.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
LICENSE Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
list.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
match.c Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
process.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
README.cosmo Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
timezone.c Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
timezone.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
ttyio.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
ttyio.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
ubz2err.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
unix.c Make more libc improvements 2022-08-06 17:18:40 -07:00
unreduce.c Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
unshrink.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
unxcfg.h Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00
unzip.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
unzip.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
unzip.mk Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
unzip.txt Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
unzpriv.h Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
unzvers.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
zip.h Add Info-ZIP unzip.com 2022-06-10 05:09:11 -07:00
zipinfo.c Prove that Makefile is fully defined 2022-08-06 04:05:08 -07:00
zipinfo.txt Revert whitespace fixes to third_party (#501) 2022-07-21 21:46:07 -07:00

DESCRIPTION

  The UNIX unzip command, courtesy of the Info-ZIP project.

PROVENANCE

  unzip610b.zip (circa 2010)
  https://sourceforge.net/projects/infozip/files/unreleased%20Betas/UnZip%20betas/

LICENSE

  BSD-like with Apache-like requirement that changes be documented.

LOCAL CHANGES

  The only way this software differs from the normal InfoZIP sources is
  that we're linking the Cosmopolitan C Library, which enables it to be
  built as an Actually Portable Executable.

  Minor changes include:

  - Normalization of header / build config for platform / repository
    sed -i -e '/# *include  *<.*/d'  *.*
    sed -i -e 's!# *include  *"!#include "third_party/unzip/!' *.*
    sed -i -e '1 i\// clang-format off' *.c *.h

  - Fixed a lot of static analysis buffer overflow warnings.