[Bug 889] New: expr usage in exinext invalid on FreeBSD

View: New views
8 Messages — Rating Filter:   Alert me  

[Bug 889] New: expr usage in exinext invalid on FreeBSD

by Brent Bloxam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889
           Summary: expr usage in exinext invalid on FreeBSD
           Product: Exim
           Version: 4.69
          Platform: All
        OS/Version: FreeBSD
            Status: NEW
          Severity: bug
          Priority: low
         Component: Unfiled
        AssignedTo: nigel@...
        ReportedBy: brentb@...
                CC: exim-dev@...


From the FreeBSD man pages:

     Unless FreeBSD 4.x compatibility is enabled, this version of expr adheres
     to the POSIX Utility Syntax Guidelines, which require that a leading
     argument beginning with a minus sign be considered an option to the pro-
     gram.

expr on FreeBSD requires '--' to come before any actual expression that uses
'-', or have expr compatibility mode be enabled by exporting EXPR_COMPAT=1.
Without this, exinext will fail. Including '--' appears to be harmless and not
affect expr operation on Linux.

--- /usr/exim/bin/exinext       2009-05-15 14:56:22.000000000 -0400
+++ ./exinext   2009-09-17 11:58:58.000000000 -0400
@@ -26,16 +26,16 @@
 eximmacdef=
 exim_path=

-if expr $1 : '\-' >/dev/null ; then
-  while expr $1 : '\-' >/dev/null ; do
+if expr -- $1 : '\-' >/dev/null ; then
+  while expr -- $1 : '\-' >/dev/null ; do
     if [ "$1" = "-C" ]; then
       config=$2
       shift
       shift
-    elif expr $1 : '\-D' >/dev/null ; then
+    elif expr -- $1 : '\-D' >/dev/null ; then
       eximmacdef="$eximmacdef $1"
-      if expr $1 : '\-DEXIM_PATH=' >/dev/null ; then
-        exim_path=`expr $1 : '\-DEXIM_PATH=\(.*\)'`
+      if expr -- $1 : '\-DEXIM_PATH=' >/dev/null ; then
+        exim_path=`expr -- $1 : '\-DEXIM_PATH=\(.*\)'`
       fi
       shift
     else


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

[Bug 889] expr usage in exinext invalid on FreeBSD

by Bugzilla from nigel@exim.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889




--- Comment #1 from Nigel Metheringham <nigel@...>  2009-10-26 13:15:48 ---
Gentlemen,

Can I have comments/votes on whether to apply this patch....

[patch changes exinext to use "expr --" instead of "expr"


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

[Bug 889] expr usage in exinext invalid on FreeBSD

by Bugzilla from nigel@exim.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889

Nigel Metheringham <nigel@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Nigel Metheringham <nigel@...>  2009-10-26 13:18:55 ---
CVS commit by nm4:

Dovecot buffer overrun fix.  Fixes: bug#889

--- CVS commit summary ---
1.581  1.582  +2 -0  -  exim/exim-doc/doc-txt/ChangeLog
1.10   1.11   +1 -0  -  exim/exim-src/src/auths/dovecot.c


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

[Bug 889] expr usage in exinext invalid on FreeBSD

by Bugzilla from nigel@exim.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889

Nigel Metheringham <nigel@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #3 from Nigel Metheringham <nigel@...>  2009-10-26 13:20:15 ---
Put wrong bug id on a commit - this bug has not been fixed or changed...


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

[Bug 889] expr usage in exinext invalid on FreeBSD

by Bugzilla from nigel@exim.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889

Nigel Metheringham <nigel@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #4 from Nigel Metheringham <nigel@...>  2009-10-26 13:22:15 ---
CVS commit by nm4:

Dovecot buffer overrun fix.  Fixes: bug#868, Related: bug#889

--- CVS commit summary ---
1.582  1.583  +1 -1  -  exim/exim-doc/doc-txt/ChangeLog


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

[Bug 889] expr usage in exinext invalid on FreeBSD

by Bugzilla from graeme@graemef.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889

Graeme Fowler <graeme@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |graeme@...
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #5 from Graeme Fowler <graeme@...>  2009-10-26 14:01:34 ---
Same commit on wrong bug, Nigel - can you do that commit on the right one?

Graeme


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

[Bug 889] expr usage in exinext invalid on FreeBSD

by Bugzilla from graeme@graemef.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889




--- Comment #6 from Graeme Fowler <graeme@...>  2009-10-26 14:09:49 ---
Comment on this one: "--" is used by many Linux shell commands as the separator
between options and arguments. I know I use it a lot with the grep "family" of
commands.

The patch looks harmless enough to me - I've applied it locally without issue.

Graeme


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

[Bug 889] expr usage in exinext invalid on FreeBSD

by Bugzilla from nigel@exim.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=889

Nigel Metheringham <nigel@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #7 from Nigel Metheringham <nigel@...>  2009-10-30 15:14:05 ---
CVS commit by nm4:

Change "expr" to "expr --" in all shell scripts.  Fixes: bug#889

--- CVS commit summary ---
1.584  1.585  +3 -0  -  exim/exim-doc/doc-txt/ChangeLog
1.2    1.3    +1 -1  -  exim/exim-src/scripts/exim_install
1.9    1.10   +2 -2  -  exim/exim-src/src/exicyclog.src
1.3    1.4    +5 -5  -  exim/exim-src/src/exinext.src


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##