You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1998/07/22 06:10:34 UTC

config/2654: APACI autoconfig generates broken Configure.apaci (fwd)

Sigh.  Broken broken broken.

First, the single unix spec grandly declares that echo shall take no
options and everyone should use printf to do anything useful.

Second, (my) history says that echo shouldn't interpret unless it gets -e.

On top of that, even according to the single unix spec "\1" should _NOT_
be treated as an octal because it isn't \01.

Obviously, we can't just use -E.

What is this echo that causes problems anyway, and where is \1 being used?

---------- Forwarded message ----------
Date: 21 Jul 1998 19:02:58 -0000
From: Andreas Muck <an...@koala.rhein-neckar.de>
To: apbugs@hyperreal.org
Subject: config/2654: APACI autoconfig generates broken Configure.apaci


>Number:         2654
>Category:       config
>Synopsis:       APACI autoconfig generates broken Configure.apaci
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Jul 21 12:10:01 PDT 1998
>Last-Modified:
>Originator:     andi@koala.rhein-neckar.de
>Organization:
apache
>Release:        1.3.0
>Environment:
Linux (irrelevant) where "echo" interprets the backslash by default
>Description:
If the "echo" command intreprets the backslash characters by default, configure will generate a broken Configure.apaci file. So, echo "\1" will actually produce the ASCII character with the code 1 instead of the string "\1".
>How-To-Repeat:

>Fix:
Replace all "echo" in the configure script with "echo -E". Better yet (this may break on other platforms) use a customizable variable ECHO in the script so one can edit one line to get the echo command work the way it should.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]




Re: config/2654: APACI autoconfig generates broken Configure.apaci (fwd)

Posted by Manoj Kasichainula <ma...@io.com>.
On Tue, Jul 21, 1998 at 09:10:34PM -0700, Marc Slemko wrote:
> What is this echo that causes problems anyway, and where is \1 being used?

The builtin echo in zsh and bash has no trouble.

For /bin/echo under RH Linux 5.1 (GNU echo? part of sh-utils package):

/bin/echo '\1' -> ^A
...
/bin/echo '\7' -> ^G
/bin/echo '\8' -> \8
/bin/echo '\10' -> ^H

Looks like it tries to do octal interpretation if possible, even
without a leading zero.

Now where is this used in APACI? In generating sed scripts, there seem
to be a few \\1's in double quotes for building a sed statement, but I
see no \1's used without protection. And I've never had problems under
Linux that I know of.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
"Everything sucks." - Butthead