bin/54109: [patch]: jexec does not duplicate the actions of shell
searches
Christian S.J. Peron
maneo at bsdpro.com
Fri Jul 4 12:00:27 PDT 2003
>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 at 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:
More information about the freebsd-bugs
mailing list