[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 Git Commit changed: What|Removed |Added CC||g...@exim.org --- Comment #8 from Git Commit --- Git commit: https://git.exim.org/exim.git/commitdiff/82a996b1cc5a4299674260962778fc2ad1f2f75e commit 82a996b1cc5a4299674260962778fc2ad1f2f75e Author: Heiko Schlittermann (HS12-RIPE) AuthorDate: Wed Apr 17 23:33:03 2019 +0200 Commit: Heiko Schlittermann (HS12-RIPE) CommitDate: Fri Apr 19 15:48:50 2019 +0200 exigrep: do case sensitive option processing again. Closes 2392 -M (--related) was hidden by -m (--man), because of case insensitive option matching. (4.90 ⦠4.92 did case insensitive option processing) Thanks to Andreas Metzler for reporting this issue. --- doc/doc-txt/ChangeLog | 7 +++ src/src/exigrep.src | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 01ee179..cf8c41a 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -70,6 +70,13 @@ HS/01 Bug 2390: Use message_id for tempfile creation to avoid races in a systems which restrict the file name length to lower values. (It was "hdr.$pid".) +HS/01 Bug 2390: Use message_id for tempfile creation to avoid races in a + shared (NFS) environment. + +HS/02 Bug 2392: exigrep does case sensitive *option* processing (as it + did for all versions <4.90). Notably -M, -m, --invert, -I may be + affected. + Exim version 4.92 - diff --git a/src/src/exigrep.src b/src/src/exigrep.src index 5db01fe..afd3538 100644 --- a/src/src/exigrep.src +++ b/src/src/exigrep.src @@ -5,7 +5,7 @@ use strict; BEGIN { pop @INC if $INC[-1] eq '.' }; use Pod::Usage; -use Getopt::Long; +use Getopt::Long qw(:config no_ignore_case); use File::Basename; # Copyright (c) 2007-2017 University of Cambridge. @@ -354,7 +354,7 @@ Do not use a pager, even if STDOUT is connected to a terminal. =item B<-h>|B<--help> Print a short reference help. For more detailed help try L, -or C. +or C. =item B<-m>|B<--man> -- You are receiving this mail because: You are on the CC list for the bug.-- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 Heiko Schlittermann changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #7 from Heiko Schlittermann --- closed with 82a996b1c -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 Heiko Schlittermann changed: What|Removed |Added Status|RESOLVED|CLOSED -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 --- Comment #6 from Andreas Metzler --- (In reply to Heiko Schlittermann from comment #5) [...] > So the case-insensitivity exists in 4.90 through 4.92. (4.90 was > released Dec 2017) > I'd like to make exigrep's option processing case sensitive again. Even > it is an incompatible change (for 4.90â¦4.92), I'd consider it > "low-impact". > What do you think? Fair enough. Thanks! -- You are receiving this mail because: You are on the CC list for the bug.-- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 --- Comment #5 from Heiko Schlittermann --- The use of GetOpt::Long was introduced roughly 2 years ago. I replaced Getopt::Std, which operates case *sensitive*. So the case-insensitivity exists in 4.90 through 4.92. (4.90 was released Dec 2017) I'd like to make exigrep's option processing case sensitive again. Even it is an incompatible change (for 4.90â¦4.92), I'd consider it "low-impact". What do you think? -- You are receiving this mail because: You are on the CC list for the bug.-- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 --- Comment #4 from Andreas Metzler --- (In reply to Heiko Schlittermann from comment #3) > (In reply to Andreas Metzler from comment #2) [...] >> Personally I would suggest to change the short form of --related instead, >> e.g. to "-r". - Imho the current choice (-M) is strange. > Yes, it is strange, but do we know, if really nobody uses it? As a data point this broke quite recently (March 2017, released in 4.90 0a27a8228d3ccf0730f54710781abb1185ed26b5) So I think you are right, we do not know that. > Maybe add "-r", and keep "-M", but issue a warning before proceeding. > And somewhen in the future remove "-M". > Same for other options if they're used case-ignored. > What do you think? I think the simple straightforward fix (drop -m) is enough. --- diff --git a/src/src/exigrep.src b/src/src/exigrep.src index 5db01fe0..57396414 100644 --- a/src/src/exigrep.src +++ b/src/src/exigrep.src @@ -223,7 +223,7 @@ GetOptions( 'pager!' => \$use_pager, 'v|invert' => \$invert, 'h|help' => sub { pod2usage(-exit => 0, -verbose => 1) }, - 'm|man' => sub { + 'man'=> sub { pod2usage( -exit => 0, -verbose => 2, @@ -356,7 +356,7 @@ Do not use a pager, even if STDOUT is connected to a terminal. Print a short reference help. For more detailed help try L, or C. -=item B<-m>|B<--man> +=item B<--man> Print this manual page of B. --- -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 --- Comment #3 from Heiko Schlittermann --- (In reply to Andreas Metzler from comment #2) > (In reply to Heiko Schlittermann from comment #1) > > I'd remove the short form of --man (-m), as I believe, *this* cannot be in > > wide use in scripts. For -M|--related I can imagine scripts using it. > [...] > > Personally I would suggest to change the short form of --related instead, > e.g. to "-r". - Imho the current choice (-M) is strange. Yes, it is strange, but do we know, if really nobody uses it? Maybe ad "-r", and keep "-M", but issue a warning before proceeding. And somewhen in the future remove "-M". Same for other options if they're used case-ignored. What do you think? -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2392] exigrep: Option processing is case-insensitive
https://bugs.exim.org/show_bug.cgi?id=2392 Heiko Schlittermann changed: What|Removed |Added Summary|Option processing is|exigrep: Option processing |case-insensitive|is case-insensitive -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##