mlocate: avoid using setgid
Fixes https://github.com/termux/termux-packages/issues/3824
This commit is contained in:
parent
e4d78ff89b
commit
ef6f0e7beb
@ -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
|
||||
|
||||
|
13
packages/mlocate/no_getid.patch
Normal file
13
packages/mlocate/no_getid.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- src/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
|
Loading…
Reference in New Issue
Block a user