comparison svr-agentfwd.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 10f4d3319780
comparison
equal deleted inserted replaced
69:59d16db56e9f 70:b0316ce64e4b
62 goto fail; 62 goto fail;
63 } 63 }
64 64
65 /* create the unix socket dir and file */ 65 /* create the unix socket dir and file */
66 if (bindagent(fd, chansess) == DROPBEAR_FAILURE) { 66 if (bindagent(fd, chansess) == DROPBEAR_FAILURE) {
67 return DROPBEAR_FAILURE; 67 goto fail;
68 } 68 }
69 69
70 /* listen */ 70 /* listen */
71 if (listen(fd, 20) < 0) { 71 if (listen(fd, 20) < 0) {
72 goto fail; 72 goto fail;
144 if (chansess->agentlistener != NULL) { 144 if (chansess->agentlistener != NULL) {
145 remove_listener(chansess->agentlistener); 145 remove_listener(chansess->agentlistener);
146 chansess->agentlistener = NULL; 146 chansess->agentlistener = NULL;
147 } 147 }
148 148
149 if (chansess->agentfile && chansess->agentdir) { 149 if (chansess->agentfile != NULL && chansess->agentdir != NULL) {
150 150
151 /* Remove the dir as the user. That way they can't cause problems except 151 /* Remove the dir as the user. That way they can't cause problems except
152 * for themselves */ 152 * for themselves */
153 uid = getuid(); 153 uid = getuid();
154 gid = getgid(); 154 gid = getgid();