Merge pull request #3825 from termux/mlocate

mlocate: avoid using setgid
This commit is contained in:
Henrik Grimler 2019-05-18 10:33:27 +02:00 committed by GitHub
commit 60fd8dcfbe
2 changed files with 14 additions and 1 deletions

View File

@ -6,7 +6,7 @@ TERMUX_PKG_LICENSE="GPL-2.0"
# like in '*.deb'.
TERMUX_PKG_DEPENDS="libandroid-support"
TERMUX_PKG_VERSION=0.26
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://releases.pagure.org/mlocate/mlocate-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=3063df79fe198fb9618e180c54baf3105b33d88fe602ff2d8570aaf944f1263e

View File

@ -0,0 +1,13 @@
--- ../locate.c.orig
+++ ./src/locate.c
@@ -945,8 +945,10 @@
static void
drop_setgid (void)
{
+#if !defined(__ANDROID__)
if (setgid (getgid ()) != 0)
error (EXIT_FAILURE, errno, _("can not drop privileges"));
+#endif
}
/* Handle a conf_dbpath ENTRY, drop privileges when they are no longer