Allow minijail to run statically linked targets
minijail will now detect static targets and sandbox them
BUG:chromium:355109
TEST=Tested with autotest security_Minijail0 on arm and x64
Change-Id: I4c38f652207c5c50158449f952b14e9402e17751
Reviewed-on: https://chromium-review.googlesource.com/203013
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Lee Campbell <leecam@chromium.org>
Commit-Queue: Lee Campbell <leecam@chromium.org>
diff --git a/Makefile b/Makefile
index be4f8e4..204e64b 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
tests : libminijail_unittest.wrapper syscall_filter_unittest
minijail0 : libsyscalls.gen.o libminijail.o syscall_filter.o \
- signal.o bpf.o util.o minijail0.c
+ signal.o bpf.o util.o elfparse.o minijail0.c
$(CC) $(CFLAGS) -o $@ $^ -lcap -ldl
libminijail.so : libminijail.o syscall_filter.o signal.o bpf.o util.o \
@@ -63,6 +63,8 @@
util.o : util.c util.h
+elfparse.o : elfparse.c elfparse.h
+
# Only regenerate libsyscalls.gen.c if the Makefile or header changes.
# NOTE! This will not detect if the file is not appropriate for the target.
libsyscalls.gen.c : Makefile libsyscalls.h