Files
termux-packages/packages/libssh/fix-paths.patch

52 lines
2.2 KiB
Diff
Raw Permalink Normal View History

2019-06-29 17:53:45 +03:00
diff -uNr libssh-0.9.0/src/dh-gex.c libssh-0.9.0.mod/src/dh-gex.c
--- libssh-0.9.0/src/dh-gex.c 2019-06-27 11:37:37.000000000 +0300
+++ libssh-0.9.0.mod/src/dh-gex.c 2019-06-29 17:28:16.549587113 +0300
@@ -294,7 +294,7 @@
2019-03-02 14:52:41 +02:00
2019-06-29 17:53:45 +03:00
#ifdef WITH_SERVER
-#define MODULI_FILE "/etc/ssh/moduli"
+#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 @@
2019-03-02 14:52:41 +02:00
SAFE_FREE(session->opts.global_knownhosts);
if (v == NULL) {
session->opts.global_knownhosts =
- strdup("/etc/ssh/ssh_known_hosts");
+ strdup("@TERMUX_PREFIX@/etc/ssh/ssh_known_hosts");
if (session->opts.global_knownhosts == NULL) {
ssh_set_error_oom(session);
return -1;
2019-06-29 17:53:45 +03:00
@@ -1449,7 +1449,7 @@
2019-03-02 14:52:41 +02:00
2023-05-05 03:10:39 +09:00
if ((session->opts.exp_flags & SSH_OPT_EXP_FLAG_GLOBAL_KNOWNHOSTS) == 0) {
if (session->opts.global_knownhosts == NULL) {
- tmp = strdup("/etc/ssh/ssh_known_hosts");
+ tmp = strdup("@TERMUX_PREFIX@/etc/ssh/ssh_known_hosts");
} else {
tmp = ssh_path_expand_escape(session,
session->opts.global_knownhosts);
2019-06-29 17:53:45 +03:00
diff -uNr libssh-0.9.0/src/socket.c libssh-0.9.0.mod/src/socket.c
--- libssh-0.9.0/src/socket.c 2019-06-27 11:34:16.000000000 +0300
+++ libssh-0.9.0.mod/src/socket.c 2019-06-29 17:26:21.278467080 +0300
2023-05-05 03:10:39 +09:00
@@ -925,11 +925,11 @@
2022-11-23 14:35:02 +09:00
if (shell == NULL || shell[0] == '\0') {
2023-05-05 03:10:39 +09:00
/* Fall back to the /bin/sh only if the bash is not available. But there are
* issues with dash or whatever people tend to link to /bin/sh */
- rc = access("/bin/bash", 0);
+ rc = access("@TERMUX_PREFIX@/bin/bash", 0);
if (rc != 0) {
- shell = "/bin/sh";
+ shell = "@TERMUX_PREFIX@/bin/sh";
} else {
- shell = "/bin/bash";
+ shell = "@TERMUX_PREFIX@/bin/bash";
}
2022-11-23 14:35:02 +09:00
}
args[0] = shell;