chiark / gitweb /
preload-hacks: Some patches to make it work.
[termux-packages] / packages / dropbear / svr-agentfwd.c.patch
1 diff -uNr dropbear-2018.76/svr-agentfwd.c dropbear-2018.76.mod/svr-agentfwd.c
2 --- dropbear-2018.76/svr-agentfwd.c     2018-02-27 16:25:12.000000000 +0200
3 +++ dropbear-2018.76.mod/svr-agentfwd.c 2018-04-21 13:46:57.660403020 +0300
4 @@ -41,7 +41,7 @@
5  #include "listener.h"
6  #include "auth.h"
7  
8 -#define AGENTDIRPREFIX "/tmp/dropbear-"
9 +#define AGENTDIRPREFIX "@TERMUX_PREFIX@/tmp/dropbear-"
10  
11  static int send_msg_channel_open_agent(int fd);
12  static int bindagent(int fd, struct ChanSess * chansess);
13 @@ -218,10 +218,12 @@
14         /* drop to user privs to make the dir/file */
15         uid = getuid();
16         gid = getgid();
17 +       /*
18         if ((setegid(ses.authstate.pw_gid)) < 0 ||
19                 (seteuid(ses.authstate.pw_uid)) < 0) {
20                 dropbear_exit("Failed to set euid");
21         }
22 +       */
23  
24         memset((void*)&addr, 0x0, sizeof(addr));
25         addr.sun_family = AF_UNIX;