ujail: rework fs jail part
authorEtienne CHAMPETIER <champetier.etienne@gmail.com>
Fri, 27 Nov 2015 16:27:14 +0000 (16:27 +0000)
committerJohn Crispin <blogic@openwrt.org>
Fri, 27 Nov 2015 16:50:24 +0000 (17:50 +0100)
commit15ff8b1d09187c11b1331f811cc75b0dd2076827
treebf2e07688373358576a0d0f58eb9cb2e3e1e84b6
parent346152decc4aa3a5521047f3493127b64daa8098
ujail: rework fs jail part

Change functions to work with full paths (do less split and concat of path)
  Store "soname" as key and the fullpath as path in "libraries"
  Remove "extras" list and replace it with "mounts" avl_tree
  ("mounts" also store fullpath)

Add add_path_and_deps() function to handle file/lib openning and mmaping
  Check if file is an elf (magic number) before passing it to elf_load_deps()
  elf_load_deps() now only handle elf parsing part
  next commit adds script (#!) handling

Use add_path_and_deps() with -r and -w args to automatically add dependencies

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
CMakeLists.txt
jail/elf.c
jail/elf.h
jail/fs.c [new file with mode: 0644]
jail/fs.h [new file with mode: 0644]
jail/jail.c
jail/jail.h [new file with mode: 0644]