Bug#856170: molly-guard: hostname should not be case-sensitive
I rewrite it without the option: https://gitlab.com/sim6/molly-guard/compare/master...sim6_hostname_case_insensitive_always I will try to create a new version of the package. Thanks!
Bug#856170: molly-guard: hostname should not be case-sensitive
On 2017-07-05 at 20:26:03, Simó Albert i Beltran wrote: > The tr command is introducing a dependency of coreutils package. I think it's fine to add a dependency on coreutils. > I can change the default value of the option, but if you prefer I will > remove the option. Yes, I think we don't need the option. Let's make it case insensitive all of the time. Francois -- https://fmarier.org/
Bug#856170: molly-guard: hostname should not be case-sensitive
Thanks for your comments. The tr command is introducing a dependency of coreutils package. This is not strictly true because we use cat. But if it is configurable we can recommend coreutils but if this is not configurable we need to add coreutils as dependency. I can change the default value of the option, but if you prefer I will remove the option.
Bug#856170: molly-guard: hostname should not be case-sensitive
On 2017-07-04 at 00:23:14, Simó Albert i Beltran wrote: > What do you think about this patch? > > https://gitlab.com/sim6/molly-guard/compare/master...sim6_hostname_case_insensitive Thanks for the patch! I'd be tempted to make it even simpler: always do a case-insentive match (no option). molly-guard is meant to help sysadmins double-check that they are rebooting the right host. If you rely on case to avoid rebooting your servers, you're going to get into trouble anyways. What do you think? Francois
Bug#856170: molly-guard: hostname should not be case-sensitive
What do you think about this patch? https://gitlab.com/sim6/molly-guard/compare/master...sim6_hostname_case_insensitive
Bug#856170: molly-guard: hostname should not be case-sensitive
On 2017-02-25 16:17, Nicolas Braud-Santoni wrote: Would a patch changing this behaviour be considered for inclusion? If so, I would happily provide one. That sounds like a good idea. I'd be happy to review and merge that. Francois
Bug#856170: molly-guard: hostname should not be case-sensitive
Package: molly-guard Version: 0.4.5-1.1 Severity: wishlist Dear Maintainer, molly-guard's 30-query-hostname script performs a case-sensitive comparison of the short-form hostname with user input, which is rather inconvenient since hostnames (at least in DNS) are case-insensitive anyhow: > nicoo@AlGrothendieck:~$ sudo reboot > [sudo] password for nicoo: > Sorry, try again. > [sudo] password for nicoo: > I: molly-guard: reboot is always molly-guarded on this system. > Please type in hostname of the machine to reboot: algrothendieck > Good thing I asked; I won't reboot AlGrothendieck ... > W: aborting reboot due to 30-query-hostname exiting with code 1. Would a patch changing this behaviour be considered for inclusion? If so, I would happily provide one. Best, nicoo