summaryrefslogtreecommitdiffhomepage
path: root/cli-agentfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2009-07-01 04:53:17 +0000
committerMatt Johnston <matt@ucc.asn.au>2009-07-01 04:53:17 +0000
commitc6582dbe370705270e6164ff8212dbdddafd9250 (patch)
tree16995bf01183b34461fd95df3f96000a5d3f2547 /cli-agentfwd.c
parent709a3e75cfb242c1b7165e599a4ccc54198967ca (diff)
Make it compile, update for changes in channel structure.
--HG-- branch : agent-client extra : convert_revision : 84676a98a0848224078a716b1292744a34e9d80c
Diffstat (limited to 'cli-agentfwd.c')
-rw-r--r--cli-agentfwd.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/cli-agentfwd.c b/cli-agentfwd.c
index f0fe385..f2d903a 100644
--- a/cli-agentfwd.c
+++ b/cli-agentfwd.c
@@ -47,7 +47,7 @@
static int new_agent_chan(struct Channel * channel);
-const struct ChanType chan_cli_agent = {
+const struct ChanType cli_chan_agent = {
0, /* sepfds */
"auth-agent@openssh.com",
new_agent_chan,
@@ -85,8 +85,8 @@ static int new_agent_chan(struct Channel * channel) {
ses.maxfd = MAX(ses.maxfd, fd);
- channel->infd = fd;
- channel->outfd = fd;
+ channel->readfd = fd;
+ channel->writefd = fd;
// success
return 0;
@@ -151,7 +151,7 @@ out:
return inbuf;
}
-static SignKeyList * agent_get_key_list(int fd)
+static struct SignKeyList * agent_get_key_list(int fd)
{
buffer * inbuf = NULL;
unsigned int num = 0;
@@ -183,7 +183,7 @@ static SignKeyList * agent_get_key_list(int fd)
num = buf_getint(inbuf);
for (i = 0; i < num; i++) {
sign_key * pubkey = NULL;
- char key_type = DROPBEAR_SIGNKEY_ANY;
+ int key_type = DROPBEAR_SIGNKEY_ANY;
struct SignKeyList *nextkey = NULL;
nextkey = (struct SignKeyList*)m_malloc(sizeof(struct SignKeyList));
@@ -218,16 +218,15 @@ out:
return retkey;
}
-/* return DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
-SignKeyList * load_agent_keys()
+void load_agent_keys()
{
- SignKeyList * ret_list;
+ struct SignKeyList * ret_list;
int fd;
fd = connect_agent();
if (fd < 0) {
dropbear_log(LOG_INFO, "Failed to connect to agent");
- return NULL;
+ return;
}
ret_list = agent_get_key_list(fd);