Mercurial > dropbear
diff cli-agentfwd.c @ 547:cf376c696dfc agent-client
Make it compile, update for changes in channel structure.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 01 Jul 2009 04:53:17 +0000 |
parents | ca7e76d981d9 |
children | 61c3513825b0 |
line wrap: on
line diff
--- a/cli-agentfwd.c Wed Jul 01 04:16:32 2009 +0000 +++ b/cli-agentfwd.c Wed Jul 01 04:53:17 2009 +0000 @@ -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 */ "[email protected]", new_agent_chan, @@ -85,8 +85,8 @@ 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 @@ 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 @@ 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 @@ 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);