agentfwd.h 2.12 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Dropbear - a SSH2 server
 * 
 * Copyright (c) 2002,2003 Matt Johnston
 * All rights reserved.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE. */
24
25
#ifndef DROPBEAR_AGENTFWD_H_
#define DROPBEAR_AGENTFWD_H_
26
27
28
29

#include "includes.h"
#include "chansession.h"
#include "channel.h"
30
#include "auth.h"
31
#include "list.h"
32

33
#if DROPBEAR_CLI_AGENTFWD
34

35
36
37
38
39
/* An agent reply can be reasonably large, as it can
 * contain a list of all public keys held by the agent.
 * 10000 is arbitrary */
#define MAX_AGENT_REPLY  10000

40
/* client functions */
Matt Johnston's avatar
Matt Johnston committed
41
void cli_load_agent_keys(m_list * ret_list);
42
void agent_buf_sign(buffer *sigblob, sign_key *key, 
43
	buffer *data_buf);
Matt Johnston's avatar
Matt Johnston committed
44
45
void cli_setup_agent(struct Channel *channel);

46
47
48
49
50
#ifdef __hpux
#define seteuid(a)       setresuid(-1, (a), -1)
#define setegid(a)       setresgid(-1, (a), -1)
#endif

51
extern const struct ChanType cli_chan_agent;
52

53
#endif /* DROPBEAR_CLI_AGENTFWD */
54

55
#if DROPBEAR_SVR_AGENTFWD
56
57
58
59
60

int svr_agentreq(struct ChanSess * chansess);
void svr_agentcleanup(struct ChanSess * chansess);
void svr_agentset(struct ChanSess *chansess);

61
#endif /* DROPBEAR_SVR_AGENTFWD */
62

63
#endif /* DROPBEAR_AGENTFWD_H_ */