Browse Source

Don't use setresgid or setgid in ssh-agent

Fixes it for Android Pie, see #2714
android-5
Gerben Meijer 6 years ago
committed by Fredrik Fornwall
parent
commit
62d02fa725
  1. 2
      packages/openssh/build.sh
  2. 15
      packages/openssh/ssh-agent.c.patch

2
packages/openssh/build.sh

@ -47,7 +47,7 @@ termux_step_pre_configure() {
## prefixed path to program 'passwd' ## prefixed path to program 'passwd'
export PATH_PASSWD_PROG="${TERMUX_PREFIX}/bin/passwd" export PATH_PASSWD_PROG="${TERMUX_PREFIX}/bin/passwd"
CPPFLAGS+=" -DHAVE_ATTRIBUTE__SENTINEL__=1" CPPFLAGS+=" -DHAVE_ATTRIBUTE__SENTINEL__=1 -DBROKEN_SETRESGID"
LD=$CC # Needed to link the binaries LD=$CC # Needed to link the binaries
LDFLAGS+=" -llog" # liblog for android logging in syslog hack LDFLAGS+=" -llog" # liblog for android logging in syslog hack
} }

15
packages/openssh/ssh-agent.c.patch

@ -0,0 +1,15 @@
diff -ruN a/ssh-agent.c b/ssh-agent.c
--- a/ssh-agent.c 2018-08-08 13:44:30.076228968 +0200
+++ b/ssh-agent.c 2018-08-08 13:46:37.282997806 +0200
@@ -1064,9 +1064,11 @@
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
+#ifndef __ANDROID__
/* drop */
setegid(getgid());
setgid(getgid());
+#endif
platform_disable_tracing(0); /* strict=no */
Loading…
Cancel
Save