|
From: | Paul Eggert |
Subject: | bug#54587: chroot: incorrectly reporting "<command>: no such file or directory" |
Date: | Sat, 26 Mar 2022 23:54:39 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
On 3/26/22 18:54, Kyle Glaws wrote:
When the shared library is missing, execvp will set errno to ENOENT. In that event, it might be possible to stat the path to the command to confirm that the command does not exist.
That would lead to a race condition, in case the file in question is removed or created between the time that execvp fails and stat is called.Plus: why should chroot be any different from other commands that invoke execvp and then rely on errno to say why execvp failed? Will we need to modify every command that invokes execvp? If so, this would indicate a bug in execvp rather than in every command that uses execvp.
[Prev in Thread] | Current Thread | [Next in Thread] |