Mercurial > dropbear
diff svr-agentfwd.c @ 560:52d7301e46bd agent-client
Agent forwarding works
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 30 Jul 2009 15:14:33 +0000 |
parents | d588e3ea557a |
children | a98a2138364a |
line wrap: on
line diff
--- a/svr-agentfwd.c Wed Jul 29 02:58:33 2009 +0000 +++ b/svr-agentfwd.c Thu Jul 30 15:14:33 2009 +0000 @@ -49,10 +49,12 @@ /* Handles client requests to start agent forwarding, sets up listening socket. * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ -int agentreq(struct ChanSess * chansess) { +int svr_agentreq(struct ChanSess * chansess) { int fd; + TRACE(("enter svr_agentreq")) + if (!svr_pubkey_allows_agentfwd()) { return DROPBEAR_FAILURE; } @@ -89,10 +91,12 @@ } return DROPBEAR_SUCCESS; + TRACE(("success")) fail: + TRACE(("fail")) /* cleanup */ - agentcleanup(chansess); + svr_agentcleanup(chansess); return DROPBEAR_FAILURE; } @@ -118,7 +122,7 @@ /* set up the environment variable pointing to the socket. This is called * just before command/shell execution, after dropping priveleges */ -void agentset(struct ChanSess * chansess) { +void svr_agentset(struct ChanSess * chansess) { char *path = NULL; int len; @@ -137,7 +141,7 @@ } /* close the socket, remove the socket-file */ -void agentcleanup(struct ChanSess * chansess) { +void svr_agentcleanup(struct ChanSess * chansess) { char *path = NULL; uid_t uid;