summaryrefslogtreecommitdiffhomepage
path: root/svr-agentfwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'svr-agentfwd.c')
-rw-r--r--svr-agentfwd.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/svr-agentfwd.c b/svr-agentfwd.c
index 87a1078..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;
@@ -181,7 +185,7 @@ void agentcleanup(struct ChanSess * chansess) {
}
-static const struct ChanType chan_agent = {
+static const struct ChanType chan_svr_agent = {
0, /* sepfds */
"auth-agent@openssh.com",
NULL,
@@ -194,7 +198,7 @@ static const struct ChanType chan_agent = {
/* helper for accepting an agent request */
static int send_msg_channel_open_agent(int fd) {
- if (send_msg_channel_open_init(fd, &chan_agent) == DROPBEAR_SUCCESS) {
+ if (send_msg_channel_open_init(fd, &chan_svr_agent) == DROPBEAR_SUCCESS) {
encrypt_packet();
return DROPBEAR_SUCCESS;
} else {