Date: Fri, 4 Jul 2003 13:50:32 -0500 (CDT) From: "Christian S.J. Peron" <maneo@bsdpro.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/54109: [patch]: jexec does not duplicate the actions of shell searches Message-ID: <200307041850.h64IoWX6045916@h24-79-64-13.wp.shawcable.net> Resent-Message-ID: <200307041900.h64J0Q2e084301@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 54109 >Category: bin >Synopsis: [patch]: jexec does not duplicate the actions of shell searches >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 04 12:00:25 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Christian S.J. Peron >Release: FreeBSD 5.1-RELEASE i386 >Organization: >Environment: System: FreeBSD h24-79-64-13 5.1-RELEASE FreeBSD 5.1-RELEASE #5: Fri Jun 20 09:49:44 CDT 2003 maneo@movl:/usr/src/sys/i386/compile/RAID0 i386 >Description: jexec does not duplicate the actions of the shell searching for an executable file if the specified file name does not contain a slash ``/'' character. Its not a big deal really, but just a bit more convinient to do something like: jexec 1 ps auxw rather than: jexec 1 /bin/ps auxw >How-To-Repeat: N/A >Fix: --- jexec.c Fri Jul 4 13:49:54 2003 +++ jexec.c.2 Fri Jul 4 13:49:40 2003 @@ -48,7 +48,7 @@ err(1, "jail_attach(): %d", jid); if (chdir("/") == -1) err(1, "chdir(): /"); - if (execv(argv[2], argv + 2) == -1) + if (execvp(argv[2], argv + 2) == -1) err(1, "execv(): %s", argv[2]); exit(0); } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307041850.h64IoWX6045916>