2 ms·
> suggested usage > alias aws="boxxy aws" (repeat for other tools) If you could find a way to somehow intercept without requiring aliasing, this would be a
by OJFord 4y ago
> suggested usage
> alias aws="boxxy aws" (repeat for other tools)
If you could find a way to somehow intercept without requiring aliasing, this would be amazing.
Also, as it is, isn't it problematic that programs might call others (outside of your shell, not respecting its aliasing).
A neat semi-solution (still worse than transparent interception if somehow possible) would be to have a boxxy-run script sym-linkable from ~/whatever/bin/aws (say) that basically just executes `boxxy "$(basename "$0")"`. So you could just symlink the same script with the name of whatever command you wanted to 'boxx'.
- chungy 4y agoI mean, you can just run "boxxy aws" if you don't want to make an alias. That's your solution for "intercept without requiring aliasing" As the program intercepts file APIs for all processes launched under it, it should handle subprocesses just fine.
- OJFord 4y agoNo I mean as in if I run foobar, which itself happens to call aws under the hood. Now I need both boxxy foobar and boxxy aws configured for the same ~/.aws redirection.
- alerighi 4y agoPerhaps a better solution would have been not using the Linux namespaces but using LD_PRELOAD to preload a shared library to intercept all the FS-related API and normalize the path. Of course more complex and would only function for dynamically linked executables, but would have not required to launch the executable with a proxy and would also be more stable, not relying on not so stable features such as Linux namespaces.
- notamy 4y ago> If you could find a way to somehow intercept without requiring aliasing, this would be amazing. I figured out while testing that `boxxy sh` works as expected, so I would imagine you can wrap any shell in it since it’s just a mount namespace. > Also, as it is, isn't it problematic that programs might call others (outside of your shell, not respecting its aliasing). Nope! Any spawned processes live inside the same mount namespace and see the same pretend view of the world.