libssh: update to 0.9.0
This commit is contained in:
parent
e61a9c1547
commit
8d7cd62601
@ -1,10 +1,9 @@
|
|||||||
TERMUX_PKG_HOMEPAGE=https://www.libssh.org/
|
TERMUX_PKG_HOMEPAGE=https://www.libssh.org/
|
||||||
TERMUX_PKG_DESCRIPTION="Tiny C SSH library"
|
TERMUX_PKG_DESCRIPTION="Tiny C SSH library"
|
||||||
TERMUX_PKG_LICENSE="LGPL-2.0"
|
TERMUX_PKG_LICENSE="LGPL-2.0"
|
||||||
TERMUX_PKG_VERSION=0.8.7
|
TERMUX_PKG_VERSION=0.9.0
|
||||||
TERMUX_PKG_REVISION=2
|
|
||||||
TERMUX_PKG_SHA256=43304ca22f0ba0b654e14b574a39816bc70212fdea5858a6637cc26cade3d592
|
|
||||||
TERMUX_PKG_SRCURL=https://www.libssh.org/files/${TERMUX_PKG_VERSION:0:3}/libssh-$TERMUX_PKG_VERSION.tar.xz
|
TERMUX_PKG_SRCURL=https://www.libssh.org/files/${TERMUX_PKG_VERSION:0:3}/libssh-$TERMUX_PKG_VERSION.tar.xz
|
||||||
|
TERMUX_PKG_SHA256=25303c2995e663cd169fdd902bae88106f48242d7e96311d74f812023482c7a5
|
||||||
TERMUX_PKG_DEPENDS="openssl, zlib"
|
TERMUX_PKG_DEPENDS="openssl, zlib"
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||||
-DHAVE_ARGP_H=OFF
|
-DHAVE_ARGP_H=OFF
|
||||||
|
@ -1,28 +1,19 @@
|
|||||||
diff -uNr libssh-0.8.6/examples/ssh_server_fork.c libssh-0.8.6.mod/examples/ssh_server_fork.c
|
diff -uNr libssh-0.9.0/src/dh-gex.c libssh-0.9.0.mod/src/dh-gex.c
|
||||||
--- libssh-0.8.6/examples/ssh_server_fork.c 2018-12-24 09:35:54.000000000 +0200
|
--- libssh-0.9.0/src/dh-gex.c 2019-06-27 11:37:37.000000000 +0300
|
||||||
+++ libssh-0.8.6.mod/examples/ssh_server_fork.c 2019-03-02 13:54:01.710902660 +0200
|
+++ libssh-0.9.0.mod/src/dh-gex.c 2019-06-29 17:28:16.549587113 +0300
|
||||||
@@ -308,7 +308,7 @@
|
@@ -294,7 +294,7 @@
|
||||||
if (login_tty(cdata->pty_slave) != 0) {
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
- execl("/bin/sh", "sh", mode, command, NULL);
|
|
||||||
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", mode, command, NULL);
|
|
||||||
exit(0);
|
|
||||||
default:
|
|
||||||
close(cdata->pty_slave);
|
|
||||||
@@ -347,7 +347,7 @@
|
|
||||||
close(out[1]);
|
|
||||||
close(err[1]);
|
|
||||||
/* exec the requested command. */
|
|
||||||
- execl("/bin/sh", "sh", "-c", command, NULL);
|
|
||||||
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, NULL);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff -uNr libssh-0.8.6/src/options.c libssh-0.8.6.mod/src/options.c
|
#ifdef WITH_SERVER
|
||||||
--- libssh-0.8.6/src/options.c 2018-12-24 09:35:55.000000000 +0200
|
|
||||||
+++ libssh-0.8.6.mod/src/options.c 2019-03-02 13:55:07.926515301 +0200
|
-#define MODULI_FILE "/etc/ssh/moduli"
|
||||||
@@ -622,7 +622,7 @@
|
+#define MODULI_FILE "@TERMUX_PREFIX@/etc/ssh/moduli"
|
||||||
|
/* 2 "Safe" prime; (p-1)/2 is also prime. */
|
||||||
|
#define SAFE_PRIME 2
|
||||||
|
/* 0x04 Probabilistic Miller-Rabin primality tests. */
|
||||||
|
diff -uNr libssh-0.9.0/src/options.c libssh-0.9.0.mod/src/options.c
|
||||||
|
--- libssh-0.9.0/src/options.c 2019-06-27 11:34:16.000000000 +0300
|
||||||
|
+++ libssh-0.9.0.mod/src/options.c 2019-06-29 17:28:52.049933003 +0300
|
||||||
|
@@ -666,7 +666,7 @@
|
||||||
SAFE_FREE(session->opts.global_knownhosts);
|
SAFE_FREE(session->opts.global_knownhosts);
|
||||||
if (v == NULL) {
|
if (v == NULL) {
|
||||||
session->opts.global_knownhosts =
|
session->opts.global_knownhosts =
|
||||||
@ -31,16 +22,7 @@ diff -uNr libssh-0.8.6/src/options.c libssh-0.8.6.mod/src/options.c
|
|||||||
if (session->opts.global_knownhosts == NULL) {
|
if (session->opts.global_knownhosts == NULL) {
|
||||||
ssh_set_error_oom(session);
|
ssh_set_error_oom(session);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1327,7 +1327,7 @@
|
@@ -1449,7 +1449,7 @@
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
if (filename == NULL) {
|
|
||||||
- r = ssh_config_parse_file(session, "/etc/ssh/ssh_config");
|
|
||||||
+ r = ssh_config_parse_file(session, "@TERMUX_PREFIX@/etc/ssh/ssh_config");
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
@@ -1366,7 +1366,7 @@
|
|
||||||
session->opts.knownhosts = tmp;
|
session->opts.knownhosts = tmp;
|
||||||
|
|
||||||
if (session->opts.global_knownhosts == NULL) {
|
if (session->opts.global_knownhosts == NULL) {
|
||||||
@ -49,15 +31,15 @@ diff -uNr libssh-0.8.6/src/options.c libssh-0.8.6.mod/src/options.c
|
|||||||
} else {
|
} else {
|
||||||
tmp = ssh_path_expand_escape(session, session->opts.global_knownhosts);
|
tmp = ssh_path_expand_escape(session, session->opts.global_knownhosts);
|
||||||
}
|
}
|
||||||
diff -uNr libssh-0.8.6/src/socket.c libssh-0.8.6.mod/src/socket.c
|
diff -uNr libssh-0.9.0/src/socket.c libssh-0.9.0.mod/src/socket.c
|
||||||
--- libssh-0.8.6/src/socket.c 2018-12-10 15:05:43.000000000 +0200
|
--- libssh-0.9.0/src/socket.c 2019-06-27 11:34:16.000000000 +0300
|
||||||
+++ libssh-0.8.6.mod/src/socket.c 2019-03-02 13:54:24.269341523 +0200
|
+++ libssh-0.9.0.mod/src/socket.c 2019-06-29 17:26:21.278467080 +0300
|
||||||
@@ -805,7 +805,7 @@
|
@@ -838,7 +838,7 @@
|
||||||
* @param out output file descriptor
|
void
|
||||||
*/
|
ssh_execute_command(const char *command, socket_t in, socket_t out)
|
||||||
void ssh_execute_command(const char *command, socket_t in, socket_t out){
|
{
|
||||||
- const char *args[]={"/bin/sh","-c",command,NULL};
|
- const char *args[] = {"/bin/sh", "-c", command, NULL};
|
||||||
+ const char *args[]={"@TERMUX_PREFIX@/bin/sh","-c",command,NULL};
|
+ const char *args[] = {"@TERMUX_PREFIX@/bin/sh", "-c", command, NULL};
|
||||||
/* redirect in and out to stdin, stdout and stderr */
|
/* Prepare /dev/null socket for the stderr redirection */
|
||||||
dup2(in, 0);
|
int devnull = open("/dev/null", O_WRONLY);
|
||||||
dup2(out,1);
|
if (devnull == -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user