News for hackers. Stuff that matters.
Re:How Bash Completion Works by shakna on Monday October 07, 2019 @03:02AM (#21178185)
If you sandbox, can you actually guarantee completion?

Some more complicated commands might depend on the contents of a file, or the permissions of the file, and an environment variable at the same time to find valid options.

Others may require accessing a list of processes running under the active user, which could only be accessible when running as the user in some circumstances.

Tacking on any kind of permission system will probably break thirty-odd years of programs, and would likely be a hack because of how POSIX is expected to behave.

Duct tape it certainly is, but backwards compatibility isn't something to hate either. We run code all day everyday. That completion runs code shouldn't be a surprise, and you need to judge whether or not you trust it before using it.

There are no comments on this comment yet.