During the testing libssh with current OpenSSH 7.6 and (unable-to-turn-off) privilege separation, which depends on chroot(), this looks like the simplest way to implement bogus chroot() function that will always succeed in this testing environment. I am not sure what would be the best approach to add this functionality. Either into separate tool or into some of the existing tools and trigger the functionality by some environment variable. What do you think? Would it make sense to do something like that?
See https://gitlab.com/cryptomilk/priv_wrapper for a start ...