Sample Header Ad - 728x90

fakechroot-like functionality in MacOS?

1 vote
1 answer
613 views
I want to use a chroot approach when building executables in MacOS, for having great control of the files and libraries they use. Ideally maybe chroot would be enough (and it is available in MacOS), but, first of all I think it requires the user to be root when running it, and second, I looked at the functionality offered by fakechroot and it looks more interesting than chroot for my purposes (however, fakechroot is not ported to MacOS). In particular, fakechroot looks like the way I want to follow, because it replaces functions such as open() and by replacing open() I could have a great degree of control on the "virtual environment" that I create for the executables. For example, instead of copying required system libs in the chroot tree, my patched open() could provide access to only the libraries I wish the executable to use. Is there something like this already available for MacOS? Or do I need to write it myself?
Asked by cesss (328 rep)
Jan 18, 2018, 02:38 PM
Last activity: Jan 18, 2018, 02:51 PM