termux-packages/packages/wireguard-tools/android.c.patch

19 lines
533 B
Diff
Raw Normal View History

2020-05-15 21:52:03 +02:00
--- ../android.c.orig 2020-05-15 19:44:11.410344718 +0200
+++ ./src/wg-quick/android.c 2020-05-15 21:42:30.220908645 +0200
@@ -615,12 +615,12 @@
return;
2020-05-15 21:52:03 +02:00
args[0] = "su";
- args[1] = "-p";
2020-05-15 21:52:03 +02:00
- args[2] = "-c";
+ args[1] = "-c";
+ args[2] = "PATH=@TERMUX_PREFIX@/bin:/system/bin";
memcpy(&args[3], argv, argc * sizeof(*args));
args[argc + 3] = NULL;
- printf("[$] su -p -c ");
2020-05-15 21:52:03 +02:00
+ printf("[$] su PATH=@TERMUX_PREFIX@/bin:/system/bin ");
for (int i = 0; i < argc; ++i)
printf("%s%c", argv[i], i == argc - 1 ? '\n' : ' ');