openssh: update misc_c.patch

This commit is contained in:
Lucy Phipps 2021-09-11 06:24:16 +01:00
parent ac411310eb
commit 007c5605b0
No known key found for this signature in database
GPG Key ID: 8F688A3DB7869BFE

View File

@ -1,21 +1,13 @@
diff -u -r ../openssh-6.4p1/misc.c ./misc.c diff --git a/misc.c b/misc.c
--- ../openssh-6.4p1/misc.c 2013-08-08 04:50:06.000000000 +0200 index b8d1040..1c4ce9c 100644
+++ ./misc.c 2014-02-03 03:58:35.000000000 +0100 --- a/misc.c
@@ -205,7 +205,7 @@ +++ b/misc.c
struct passwd *copy = xcalloc(1, sizeof(*copy)); @@ -1757,7 +1757,7 @@ mktemp_proto(char *s, size_t len)
copy->pw_name = xstrdup(pw->pw_name);
- copy->pw_passwd = xstrdup(pw->pw_passwd);
+ copy->pw_passwd = xstrdup(pw->pw_passwd == NULL ? "*" : pw->pw_passwd);
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
copy->pw_gecos = xstrdup(pw->pw_gecos);
#endif
@@ -948,7 +948,7 @@
if (r > 0 && (size_t)r < len) if (r > 0 && (size_t)r < len)
return; return;
} }
- r = snprintf(s, len, "/tmp/ssh-XXXXXXXXXXXX"); - r = snprintf(s, len, "/tmp/ssh-XXXXXXXXXXXX");
+ r = snprintf(s, len, "@TERMUX_PREFIX@/tmp/ssh-XXXXXXXXXXXX"); + r = snprintf(s, len, "@TERMUX_PREFIX@/tmp/ssh-XXXXXXXXXXXX");
if (r < 0 || (size_t)r >= len) if (r < 0 || (size_t)r >= len)
fatal("%s: template string too short", __func__); fatal_f("template string too short");
} }