mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-04 16:27:39 +00:00
Stop altering PATH to mirror
This commit is contained in:
parent
5be035fd44
commit
cd6918e6eb
@ -115,10 +115,12 @@ static struct node_entry *insert_child(struct node_entry *p, struct node_entry *
|
|||||||
***********/
|
***********/
|
||||||
|
|
||||||
static void set_path(struct vector *v) {
|
static void set_path(struct vector *v) {
|
||||||
|
char buffer[512];
|
||||||
for (int i = 0; environ[i]; ++i) {
|
for (int i = 0; environ[i]; ++i) {
|
||||||
if (strncmp(environ[i], "PATH=", 5) == 0) {
|
if (strncmp(environ[i], "PATH=", 5) == 0) {
|
||||||
vec_push_back(v, strdup("PATH=" BBPATH ":/sbin:" MIRRDIR "/system/bin:"
|
// Prepend BBPATH to PATH
|
||||||
MIRRDIR "/system/xbin:" MIRRDIR "/vendor/bin"));
|
sprintf(buffer, "PATH="BBPATH":%s", environ[i] + 5);
|
||||||
|
vec_push_back(v, strdup(buffer));
|
||||||
} else {
|
} else {
|
||||||
vec_push_back(v, strdup(environ[i]));
|
vec_push_back(v, strdup(environ[i]));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user