Browse Source

openssh: Update from 8.0p1 to 8.1p1

emacs-27
Fredrik Fornwall 5 years ago
parent
commit
79141a10ed
  1. 5
      packages/openssh/build.sh
  2. 31
      packages/openssh/sshd.c.patch

5
packages/openssh/build.sh

@ -1,9 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://www.openssh.com/
TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_VERSION=8.0p1
TERMUX_PKG_REVISION=6
TERMUX_PKG_SHA256=bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68
TERMUX_PKG_VERSION=8.1p1
TERMUX_PKG_SHA256=02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff
TERMUX_PKG_SRCURL=https://fastly.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl, libedit, termux-auth, krb5, zlib"
TERMUX_PKG_CONFLICTS="dropbear"

31
packages/openssh/sshd.c.patch

@ -1,18 +1,23 @@
diff -u -r ../openssh-8.0p1/sshd.c ./sshd.c
--- ../openssh-8.0p1/sshd.c 2019-04-17 22:52:57.000000000 +0000
+++ ./sshd.c 2019-04-18 06:50:06.774278599 +0000
@@ -468,8 +468,10 @@
diff -u -r ../openssh-8.1p1/sshd.c ./sshd.c
--- ../openssh-8.1p1/sshd.c 2019-10-09 00:31:03.000000000 +0000
+++ ./sshd.c 2019-10-13 09:16:33.447856567 +0000
@@ -464,6 +464,7 @@
if (chdir("/") == -1)
fatal("chdir(\"/\"): %s", strerror(errno));
+#ifndef __ANDROID__
/* Drop our privileges */
debug3("privsep user:group %u:%u", (u_int)privsep_pw->pw_uid,
(u_int)privsep_pw->pw_gid);
gidset[0] = privsep_pw->pw_gid;
+#ifndef __ANDROID__
if (setgroups(1, gidset) < 0)
@@ -471,6 +472,7 @@
if (setgroups(1, gidset) == -1)
fatal("setgroups: %.100s", strerror(errno));
+#endif
permanently_set_uid(privsep_pw);
+#endif
}
}
@@ -1444,7 +1446,8 @@
@@ -1442,7 +1444,8 @@
saved_argc = ac;
rexec_argc = ac;
saved_argv = xcalloc(ac + 1, sizeof(*saved_argv));
@ -22,7 +27,7 @@ diff -u -r ../openssh-8.0p1/sshd.c ./sshd.c
saved_argv[i] = xstrdup(av[i]);
saved_argv[i] = NULL;
@@ -1454,8 +1457,10 @@
@@ -1452,8 +1455,10 @@
av = saved_argv;
#endif
@ -33,7 +38,7 @@ diff -u -r ../openssh-8.0p1/sshd.c ./sshd.c
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
@@ -1576,8 +1581,10 @@
@@ -1574,8 +1579,10 @@
}
if (rexeced_flag || inetd_flag)
rexec_flag = 0;
@ -44,7 +49,7 @@ diff -u -r ../openssh-8.0p1/sshd.c ./sshd.c
if (rexeced_flag)
closefrom(REEXEC_MIN_FREE_FD);
else
@@ -1696,7 +1703,9 @@
@@ -1694,7 +1701,9 @@
freezero(privsep_pw->pw_passwd, strlen(privsep_pw->pw_passwd));
privsep_pw->pw_passwd = xstrdup("*");
}
@ -54,7 +59,7 @@ diff -u -r ../openssh-8.0p1/sshd.c ./sshd.c
/* load host keys */
sensitive_data.host_keys = xcalloc(options.num_host_key_files,
@@ -1858,8 +1867,10 @@
@@ -1863,8 +1872,10 @@
* to create a file, and we can't control the code in every
* module which might be used).
*/

Loading…
Cancel
Save