[exim-dev] [Bug 889] New: expr usage in exinext invalid on F…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Brent Bloxam
Date:  
À: exim-dev
Sujet: [exim-dev] [Bug 889] New: expr usage in exinext invalid on FreeBSD
------- 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