[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #28934] execve(path, args) should take path as a a relative path if
From: |
Carl Fredrik Hammar |
Subject: |
[bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes |
Date: |
Wed, 24 Feb 2010 13:43:59 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091216 Iceweasel/3.5.6 (like Firefox/3.5.6; Debian-3.5.6-2) |
Follow-up Comment #2, bug #28934 (project hurd):
Hi Emilio,
I'm pretty sure you are correct in that execve() should not look in $PATH,
because glibc's sysdeps/mach/hurd/execve.c does a regular file lookup.
As you say the exec server gets confused since it does not find bar in
$PATH, and tries to reconstruct a `correct' path to the file.
The root problem is that the exec server can't tell which exec() variant
was called, so it doesn't know how to interpret argv[0]. The easiest
way to fix this is to prepend `./' to argv[0] if needed in execve().
This is probably the correct way to fix it as well. I'm not sure if
this should be done to all relative paths or only ones that doesn't
contain slashes. I'll leave it up to you to investigate further what
POSIX says about it and how Linux does it.
Regards,
Fredrik
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28934>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Emilio Pozuelo Monfort, 2010/02/19
- [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Emilio Pozuelo Monfort, 2010/02/19
- [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes,
Carl Fredrik Hammar <=
- [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Emilio Pozuelo Monfort, 2010/02/26
- [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Carl Fredrik Hammar, 2010/02/26
- [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Emilio Pozuelo Monfort, 2010/02/26
- [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Carl Fredrik Hammar, 2010/02/26
- Re: [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Ivan Shmakov, 2010/02/27
- Re: [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Carl Fredrik Hammar, 2010/02/27
- Re: [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Ivan Shmakov, 2010/02/26
- Re: [bug #28934] execve(path, args) should take path as a a relative path if it doesn't contain slashes, Carl Fredrik Hammar, 2010/02/27