mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-29 12:44:53 +01:00
When printing an error message after command execution fails, don't assume
the only possible error is "command not found". This makes debugging of messages such as "/bin/sh: not found" less common...
This commit is contained in:
parent
de50b4a3b8
commit
3a1c425259
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49330
@ -35,7 +35,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: compat.c,v 1.11 1998/08/24 10:15:53 cracauer Exp $
|
||||
* $Id: compat.c,v 1.12 1998/09/09 05:15:38 jkoshy Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -330,7 +330,9 @@ CompatRunCommand (cmdp, gnp)
|
||||
if (local) {
|
||||
execvp(av[0], av);
|
||||
(void) write (2, av[0], strlen (av[0]));
|
||||
(void) write (2, ": not found\n", sizeof(": not found"));
|
||||
(void) write (2, ":", 1);
|
||||
(void) write (2, strerror(errno), strlen(strerror(errno)));
|
||||
(void) write (2, "\n", 1);
|
||||
} else {
|
||||
(void)execv(av[0], av);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user