Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jun 2005 20:01:21 +0200
From:      Morten Johansen <morten@oslonett.no>
To:        freebsd-current@freebsd.org
Subject:   [patch] panic executing shell-script
Message-ID:  <42B46171.2070606@oslonett.no>

next in thread | raw e-mail | index | archive | help
Hi -current,

When executing a shell-script where interpreter-name has 2 or more
trailing whitespace, kernel panics.
E.g. bin/jetty.sh from port www/jetty.

Fix:

--- imgact_shell.c      Thu Jun  9 02:27:02 2005
+++ imgact_shell.c.mj   Sat Jun 18 19:33:00 2005
@@ -161,7 +161,7 @@ exec_shell_imgact(imgp)
        while (ihp < maxp && ((*ihp != '\n') && (*ihp != '\0')))
                ihp++;
        opte = ihp;
-       while (--ihp > interpe && ((*ihp == ' ') || (*ihp == '\t')))
+       while (--ihp > optb && ((*ihp == ' ') || (*ihp == '\t')))
                opte = ihp;

        /*





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42B46171.2070606>