Mercurial > dropbear
comparison svr-x11fwd.c @ 70:b0316ce64e4b
Merging in the changes from 0.41-0.43 main Dropbear tree
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 12 Aug 2004 16:41:58 +0000 |
parents | 20563735e8b5 |
children | b855bf63766c |
comparison
equal
deleted
inserted
replaced
69:59d16db56e9f | 70:b0316ce64e4b |
---|---|
129 /* This is called after switching to the user, and sets up the xauth | 129 /* This is called after switching to the user, and sets up the xauth |
130 * and environment variables. */ | 130 * and environment variables. */ |
131 void x11setauth(struct ChanSess *chansess) { | 131 void x11setauth(struct ChanSess *chansess) { |
132 | 132 |
133 char display[20]; /* space for "localhost:12345.123" */ | 133 char display[20]; /* space for "localhost:12345.123" */ |
134 FILE * authprog; | 134 FILE * authprog = NULL; |
135 int val; | 135 int val; |
136 | 136 |
137 if (chansess->x11listener == NULL) { | 137 if (chansess->x11listener == NULL) { |
138 return; | 138 return; |
139 } | 139 } |
185 }; | 185 }; |
186 | 186 |
187 | 187 |
188 static int send_msg_channel_open_x11(int fd, struct sockaddr_in* addr) { | 188 static int send_msg_channel_open_x11(int fd, struct sockaddr_in* addr) { |
189 | 189 |
190 char* ipstring; | 190 char* ipstring = NULL; |
191 | 191 |
192 if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) { | 192 if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) { |
193 ipstring = inet_ntoa(addr->sin_addr); | 193 ipstring = inet_ntoa(addr->sin_addr); |
194 buf_putstring(ses.writepayload, ipstring, strlen(ipstring)); | 194 buf_putstring(ses.writepayload, ipstring, strlen(ipstring)); |
195 buf_putint(ses.writepayload, addr->sin_port); | 195 buf_putint(ses.writepayload, addr->sin_port); |