mtr: add patch to remove setuid call
Reported in https://github.com/termux/termux-root-packages/issues/247
This commit is contained in:
parent
8dd7f161b6
commit
9f09bd089c
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Network diagnostic tool"
|
|||||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||||
TERMUX_PKG_MAINTAINER="@termux"
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
TERMUX_PKG_VERSION=0.94
|
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_SRCURL=https://github.com/traviscross/mtr/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||||
TERMUX_PKG_SHA256=ea036fdd45da488c241603f6ea59a06bbcfe6c26177ebd34fff54336a44494b8
|
TERMUX_PKG_SHA256=ea036fdd45da488c241603f6ea59a06bbcfe6c26177ebd34fff54336a44494b8
|
||||||
TERMUX_PKG_DEPENDS="ncurses"
|
TERMUX_PKG_DEPENDS="ncurses"
|
||||||
|
18
root-packages/mtr/packet.c.patch
Normal file
18
root-packages/mtr/packet.c.patch
Normal 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'
|
Loading…
Reference in New Issue
Block a user