Add seccomp support library
Policy library which exports an autogenerated policy from SYSCALLS.TXT
blocking any other calls.
Test: Generate policy, install onto Sailfish, check boots, Chrome runs,
calls are blocked.
Bug: 32313202
Change-Id: Ib590704e50122f077eeae26561eb9b0a70386551
diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py
index b4aa06c..329184f 100755
--- a/libc/tools/gensyscalls.py
+++ b/libc/tools/gensyscalls.py
@@ -674,6 +674,7 @@
logging.basicConfig(level=logging.INFO)
-state = State()
-state.process_file(os.path.join(bionic_libc_root, "SYSCALLS.TXT"))
-state.regenerate()
+if __name__ == "__main__":
+ state = State()
+ state.process_file(os.path.join(bionic_libc_root, "SYSCALLS.TXT"))
+ state.regenerate()