mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
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
This commit is contained in:
parent
c464f45692
commit
133c693650
33 changed files with 207 additions and 1346 deletions
10
third_party/python/python.mk
vendored
10
third_party/python/python.mk
vendored
|
@ -4317,16 +4317,6 @@ o/$(MODE)/third_party/python/python.com.dbg: \
|
|||
$(APE_NO_MODIFY_SELF)
|
||||
@$(APELINK)
|
||||
|
||||
o/$(MODE)/third_party/python/python.com: \
|
||||
o/$(MODE)/third_party/python/python.com.dbg \
|
||||
o/$(MODE)/third_party/zip/zip.com \
|
||||
o/$(MODE)/tool/build/symtab.com
|
||||
@$(COMPILE) -AOBJCOPY -T$@ $(OBJCOPY) -S -O binary $< $@
|
||||
@$(COMPILE) -ASYMTAB o/$(MODE)/tool/build/symtab.com \
|
||||
-o o/$(MODE)/third_party/python/.python/.symtab $<
|
||||
@$(COMPILE) -AZIP -T$@ o/$(MODE)/third_party/zip/zip.com -9qj $@ \
|
||||
o/$(MODE)/third_party/python/.python/.symtab
|
||||
|
||||
################################################################################
|
||||
# FREEZE.COM
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue