mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-24 19:21:38 +01:00
Pass as argv[0] the name of the shell executed instead of "sh".
PR: 2851 Reported by: era@iki.fi Obtained from: NetBSD
This commit is contained in:
parent
e426af039f
commit
5cba8ccae5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49646
@ -42,7 +42,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: script.c,v 1.8 1998/03/08 14:19:18 peter Exp $";
|
||||
"$Id: script.c,v 1.9 1998/09/19 09:45:42 des Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -246,7 +246,7 @@ doshell(av)
|
||||
execvp(av[0], av);
|
||||
warn(av[0]);
|
||||
} else {
|
||||
execl(shell, "sh", "-i", NULL);
|
||||
execl(shell, shell, "-i", NULL);
|
||||
warn(shell);
|
||||
}
|
||||
fail();
|
||||
|
Loading…
Reference in New Issue
Block a user