GNU bug report logs - #54587
chroot: incorrectly reporting "<command>: no such file or directory"

Previous Next

Package: coreutils;

Reported by: Kyle Glaws <kyle.glaws <at> gmail.com>

Date: Sat, 26 Mar 2022 21:27:02 UTC

Severity: normal

Full log


Message #14 received at 54587 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Kyle Glaws <kyle.glaws <at> gmail.com>
Cc: 54587 <at> debbugs.gnu.org
Subject: Re: bug#54587: chroot: incorrectly reporting "<command>: no such file
 or directory"
Date: Sat, 26 Mar 2022 23:54:39 -0500
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.
>





This bug report was last modified 3 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.