comparison svr-agentfwd.c @ 475:52a644e7b8e1 pubkey-options

* Patch from Frédéric Moulins adding options to authorized_keys. Needs review.
author Matt Johnston <matt@ucc.asn.au>
date Mon, 08 Sep 2008 15:14:02 +0000
parents 4317be8b7cf9
children d588e3ea557a
comparison
equal deleted inserted replaced
474:f33b0898aaa6 475:52a644e7b8e1
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