chiark / gitweb /
dropbear: update to 2018.76 (#2356)
[termux-packages] / packages / dropbear / sshpty.c.patch
1 diff -uNr dropbear-2018.76/sshpty.c dropbear-2018.76.mod/sshpty.c
2 --- dropbear-2018.76/sshpty.c   2018-02-27 16:25:12.000000000 +0200
3 +++ dropbear-2018.76.mod/sshpty.c       2018-04-21 13:45:06.703730641 +0300
4 @@ -22,6 +22,10 @@
5  #include "errno.h"
6  #include "sshpty.h"
7  
8 +#ifdef __ANDROID__
9 +# define USE_DEV_PTMX 1
10 +#endif
11 +
12  /* Pty allocated with _getpty gets broken if we do I_PUSH:es to it. */
13  #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY)
14  #undef HAVE_DEV_PTMX
15 @@ -380,6 +384,7 @@
16                                 tty_name, strerror(errno));
17         }
18  
19 +       /*
20         if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
21                 if (chown(tty_name, pw->pw_uid, gid) < 0) {
22                         if (errno == EROFS &&
23 @@ -409,4 +414,5 @@
24                         }
25                 }
26         }
27 +       */
28  }