3 ms·
works great until some asshole puts alias harikb_script='harikb_script --do-it' in their .bashrc to eliminate this annoying step.
by leetcrew 6y ago
works great until some asshole puts
alias harikb_script='harikb_script --do-it'
in their .bashrc to eliminate this annoying step.
- xaedes 6y agoThis would help a bit: Don't accept the "--do-it" as first parameter, make it obligatory to be the last.
- _ikke_ 6y agomy_command() { command my_command "$@" --do-it }
- xaedes 6y agoGood point. Stuff like this is why I wrote "a bit". Thank you for providing an example, why it wont be enough.
- X6S1x6Okd1st 6y agoIf someone is a programmer and is trying to disable safety features making it slightly harder to do so doesn't really seem like the solution.
- actuallyalys 6y agoI suspect someone who'd do that isn't going to take that or other precautions seriously regardless of it being aliased. It's still a problem that they're circumventing it, but I think you have a larger problem if someone with that mindset has access to production.