summaryrefslogtreecommitdiffhomepage
path: root/svr-agentfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2009-07-30 15:14:33 +0000
committerMatt Johnston <matt@ucc.asn.au>2009-07-30 15:14:33 +0000
commitbb8234c2f12998b6cd9590f7dddd08d1871a5d1f (patch)
tree8860f704799ceb21d00a5ee830f94d1a7117e74e /svr-agentfwd.c
parentbacd2a8c795f49822146c1eea0d66c2438c26d7f (diff)
Agent forwarding works
--HG-- branch : agent-client extra : convert_revision : eb0dae4b62e243ba37a897beb7ba81a4f637d8b3
Diffstat (limited to 'svr-agentfwd.c')
-rw-r--r--svr-agentfwd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/svr-agentfwd.c b/svr-agentfwd.c
index b86c447..940c4b7 100644
--- a/svr-agentfwd.c
+++ b/svr-agentfwd.c
@@ -49,10 +49,12 @@ static void agentaccept(struct Listener * listener, int sock);
/* 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 @@ int agentreq(struct ChanSess * chansess) {
}
return DROPBEAR_SUCCESS;
+ TRACE(("success"))
fail:
+ TRACE(("fail"))
/* cleanup */
- agentcleanup(chansess);
+ svr_agentcleanup(chansess);
return DROPBEAR_FAILURE;
}
@@ -118,7 +122,7 @@ static void agentaccept(struct Listener *UNUSED(listener), int sock) {
/* 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 @@ void agentset(struct ChanSess * chansess) {
}
/* close the socket, remove the socket-file */
-void agentcleanup(struct ChanSess * chansess) {
+void svr_agentcleanup(struct ChanSess * chansess) {
char *path = NULL;
uid_t uid;