Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-openssh: Commit

external/openssh


Commit MetaInfo

Révision980506c2ffeaa6647ce953f691b35432023fcda2 (tree)
l'heure2018-08-13 11:41:32
Auteurelliott10 <xiaoluoyuan@163....>
Commiterelliott10

Message de Log

Fix the segmentation fault of ssh, and configure scp to make it work properly

Change Summary

Modification

--- a/config.h
+++ b/config.h
@@ -1603,4 +1603,4 @@
16031603
16041604 #define _PATH_PRIVSEP_CHROOT_DIR SSHDIR "/empty"
16051605
1606-#define _PATH_SSH_PROGRAM "/system/bin/sftp"
1606+#define _PATH_SSH_PROGRAM "/system/bin/ssh"
--- a/misc.c
+++ b/misc.c
@@ -208,7 +208,10 @@ pwcopy(struct passwd *pw)
208208 struct passwd *copy = xcalloc(1, sizeof(*copy));
209209
210210 copy->pw_name = xstrdup(pw->pw_name);
211- copy->pw_passwd = xstrdup(pw->pw_passwd);
211+ /* Android does not do passwords and passes NULL for them. This breaks strlen */
212+ if (pw->pw_passwd) {
213+ copy->pw_passwd = xstrdup(pw->pw_passwd);
214+ }
212215 #ifdef HAVE_STRUCT_PASSWD_PW_GECOS
213216 copy->pw_gecos = xstrdup(pw->pw_gecos);
214217 #endif
Afficher sur ancien navigateur de dépôt.