wireguard-tools: use su instead of tsu
This commit is contained in:
parent
077bf9ccc8
commit
dcdfc3b2c0
@ -1,24 +1,18 @@
|
||||
--- a/src/wg-quick/android.c
|
||||
+++ b/src/wg-quick/android.c
|
||||
@@ -242,17 +252,17 @@
|
||||
if (!getuid())
|
||||
--- ../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;
|
||||
|
||||
- args[0] = "su";
|
||||
args[0] = "su";
|
||||
- args[1] = "-p";
|
||||
+ args[0] = "tsu";
|
||||
+ args[1] = "-a";
|
||||
args[2] = "-c";
|
||||
- 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 ");
|
||||
+ printf("[$] tsu -a -c ");
|
||||
+ printf("[$] su PATH=@TERMUX_PREFIX@/bin:/system/bin ");
|
||||
for (int i = 0; i < argc; ++i)
|
||||
printf("%s%c", argv[i], i == argc - 1 ? '\n' : ' ');
|
||||
|
||||
- execvp("su", args);
|
||||
+ execvp("tsu", args);
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
|
@ -2,14 +2,14 @@ TERMUX_PKG_HOMEPAGE=https://www.wireguard.com
|
||||
TERMUX_PKG_DESCRIPTION="Tools for the WireGuard secure network tunnel"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=1.0.20200510
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-$TERMUX_PKG_VERSION.tar.xz
|
||||
TERMUX_PKG_SHA256=cd526c7ea177e59ae4c0ebc4f3cc360b8524881b090d043426bdf7e3c85ac8e7
|
||||
TERMUX_PKG_DEPENDS="tsu"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS=" -C src WITH_BASHCOMPLETION=yes WITH_WGQUICK=no WITH_SYSTEMDUNITS=no"
|
||||
|
||||
termux_step_post_make_install() {
|
||||
cd src/wg-quick
|
||||
$CC $CFLAGS $LDFLAGS -DWG_CONFIG_SEARCH_PATHS="\"$TERMUX_ANDROID_HOME/.wireguard $TERMUX_PREFIX/etc/wireguard /data/misc/wireguard /data/data/com.wireguard.android/files\"" -o wg-quick android.c
|
||||
install -Dm0700 wg-quick $TERMUX_PREFIX/bin/wg-quick
|
||||
cd src/wg-quick
|
||||
$CC $CFLAGS $LDFLAGS -DWG_CONFIG_SEARCH_PATHS="\"$TERMUX_ANDROID_HOME/.wireguard $TERMUX_PREFIX/etc/wireguard /data/misc/wireguard /data/data/com.wireguard.android/files\"" -o wg-quick android.c
|
||||
install -Dm0700 wg-quick $TERMUX_PREFIX/bin/wg-quick
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user