mtr: add patch to remove setuid call

Reported in https://github.com/termux/termux-root-packages/issues/247
This commit is contained in:
Henrik Grimler 2021-09-10 21:27:50 +02:00 committed by Yaksh Bariya
parent 8dd7f161b6
commit 9f09bd089c
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 19 additions and 1 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Network diagnostic tool"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.94
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/traviscross/mtr/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=ea036fdd45da488c241603f6ea59a06bbcfe6c26177ebd34fff54336a44494b8
TERMUX_PKG_DEPENDS="ncurses"

View File

@ -0,0 +1,18 @@
--- ./packet/packet.c.orig 2021-09-10 21:20:26.554615393 +0200
+++ ./packet/packet.c 2021-09-10 21:22:52.034900909 +0200
@@ -44,15 +44,6 @@
cap_t cap;
#endif
- /* Drop any suid permissions granted */
- if (setgid(getgid()) || setuid(getuid())) {
- return -1;
- }
-
- if (geteuid() != getuid() || getegid() != getgid()) {
- return -1;
- }
-
/*
Drop all process capabilities.
This will revoke anything granted by a commandline 'setcap'