comparison svr-agentfwd.c @ 496:9f583f4d59a6

propagate from branch 'au.asn.ucc.matt.dropbear.pubkey-options' (head 537a6ebebb46424b967ffe787f0f8560e5f447e8) to branch 'au.asn.ucc.matt.dropbear' (head 10b2f286b9886364db39dfbb4f8f46e49e345d87)
author Matt Johnston <matt@ucc.asn.au>
date Tue, 23 Sep 2008 13:16:22 +0000
parents 52a644e7b8e1
children d588e3ea557a
comparison
equal deleted inserted replaced
495:cd02449b709c 496:9f583f4d59a6
37 #include "channel.h" 37 #include "channel.h"
38 #include "packet.h" 38 #include "packet.h"
39 #include "buffer.h" 39 #include "buffer.h"
40 #include "random.h" 40 #include "random.h"
41 #include "listener.h" 41 #include "listener.h"
42 #include "auth.h"
42 43
43 #define AGENTDIRPREFIX "/tmp/dropbear-" 44 #define AGENTDIRPREFIX "/tmp/dropbear-"
44 45
45 static int send_msg_channel_open_agent(int fd); 46 static int send_msg_channel_open_agent(int fd);
46 static int bindagent(int fd, struct ChanSess * chansess); 47 static int bindagent(int fd, struct ChanSess * chansess);
49 /* Handles client requests to start agent forwarding, sets up listening socket. 50 /* Handles client requests to start agent forwarding, sets up listening socket.
50 * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ 51 * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
51 int agentreq(struct ChanSess * chansess) { 52 int agentreq(struct ChanSess * chansess) {
52 53
53 int fd; 54 int fd;
55
56 if (!svr_pubkey_allows_agentfwd()) {
57 return DROPBEAR_FAILURE;
58 }
54 59
55 if (chansess->agentlistener != NULL) { 60 if (chansess->agentlistener != NULL) {
56 return DROPBEAR_FAILURE; 61 return DROPBEAR_FAILURE;
57 } 62 }
58 63