summaryrefslogtreecommitdiff
path: root/tools/envrun.c
blob: bc5dd088814af5677a0b9d05abec86f56d8e1c04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <unistd.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
	char* argv_[] = {
		"/bin/sh",
		NULL
	};

	char* envp_[] = {
		"SHELL=/bin/sh",
		"USER=mobile",
		"HOME=/var/mobile",
		"XPC_FLAGS=0x0",
		"XPC_SERVICE_NAME=0",
		"LOGNAME=mobile",
		"PATH=/usr/bin:/bin:/usr/sbin:/sbin",
		"__CF_USER_TEXT_ENCODING=0x1F5:0:0",
		NULL
	};

	execle("/bin/sh", "/bin/sh", NULL, envp_);

	return 0;
}