Restricting access to the header file will not prevent you from accessing the libc functions: they are still available if you reference libc - you simply will not have prototypes (and macros); but you can replicate them yourself.
And not binding to libc will not help either: system calls can be made directly through the built-in assembler (or even tricks associated with switching to data).
I do not think this is a good approach overall. Running the downloaded code in a fully autonomous virtual sandbox (via QEMU or something like that, perhaps) would probably be the best way.
Matthew slattery
source share