From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 4 12:00:27 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A16CC37B401 for ; Fri, 4 Jul 2003 12:00:27 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CCF843FEA for ; Fri, 4 Jul 2003 12:00:26 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h64J0QUp084302 for ; Fri, 4 Jul 2003 12:00:26 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h64J0Q2e084301; Fri, 4 Jul 2003 12:00:26 -0700 (PDT) Resent-Date: Fri, 4 Jul 2003 12:00:26 -0700 (PDT) Resent-Message-Id: <200307041900.h64J0Q2e084301@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Christian S.J. Peron" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E126337B401 for ; Fri, 4 Jul 2003 11:50:32 -0700 (PDT) Received: from h24-79-64-13.wp.shawcable.net (h24-79-64-13.wp.shawcable.net [24.79.64.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id C428A43FB1 for ; Fri, 4 Jul 2003 11:50:31 -0700 (PDT) (envelope-from modulus@h24-79-64-13.wp.shawcable.net) Received: from h24-79-64-13.wp.shawcable.net (modulus@localhost [127.0.0.1]) h64IoWDQ045917 for ; Fri, 4 Jul 2003 13:50:32 -0500 (CDT) (envelope-from modulus@h24-79-64-13.wp.shawcable.net) Received: (from modulus@localhost)h64IoWX6045916; Fri, 4 Jul 2003 13:50:32 -0500 (CDT) Message-Id: <200307041850.h64IoWX6045916@h24-79-64-13.wp.shawcable.net> Date: Fri, 4 Jul 2003 13:50:32 -0500 (CDT) From: "Christian S.J. Peron" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/54109: [patch]: jexec does not duplicate the actions of shell searches X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Christian S.J. Peron" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2003 19:00:27 -0000 >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: