NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/61083 (fexecve fails on sh-based /usr/bin/true)
Synopsis: fexecve fails on sh-based /usr/bin/true
Responsible-Changed-From-To: bin-bug-people->kre
Responsible-Changed-By: kre%NetBSD.org@localhost
Responsible-Changed-When: Fri, 27 Nov 2026 10:36:24 +0000
Responsible-Changed-Why:
I will look into this.
I am suspecting a kernel problem (hence this probably should be
kern/61083) - where the full path name is being lost somewhere.
Note it isn't the cp that changes things, it is that the script
to be run ends up in the current directory of the process doing
the fexeve ... ie:
cd /usr/bin; $OLDPWD/fexec $(which true)
works fine, but:
cd -; cd /tmp; $OLDPWD/fexec $OLDPWD/exit0.sh
does not.
This suggests to me that on an fexecve() the full path name is not
being passed through (which the shell's "cannot exec true" suggests
as well, or it would say "cannot exec /usr/bin/true"). Similarly
I suspect that if /usr/bin/true were copied to ./true instead of
./exit0.sh then it would have appeared to work without issues.
Whether this is (reasonably) fixable is yet to be determined, but
I suspect it should be possible.
Home |
Main Index |
Thread Index |
Old Index