Changeset View
Changeset View
Standalone View
Standalone View
monitor.h
/* $OpenBSD: monitor.h,v 1.21 2018/07/09 21:53:45 markus Exp $ */ | /* $OpenBSD: monitor.h,v 1.23 2019/01/19 21:43:56 djm Exp $ */ | ||||
/* | /* | ||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu> | * Copyright 2002 Niels Provos <provos@citi.umich.edu> | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | enum monitor_reqtype { | ||||
MONITOR_REQ_PAM_INIT_CTX = 104, MONITOR_ANS_PAM_INIT_CTX = 105, | MONITOR_REQ_PAM_INIT_CTX = 104, MONITOR_ANS_PAM_INIT_CTX = 105, | ||||
MONITOR_REQ_PAM_QUERY = 106, MONITOR_ANS_PAM_QUERY = 107, | MONITOR_REQ_PAM_QUERY = 106, MONITOR_ANS_PAM_QUERY = 107, | ||||
MONITOR_REQ_PAM_RESPOND = 108, MONITOR_ANS_PAM_RESPOND = 109, | MONITOR_REQ_PAM_RESPOND = 108, MONITOR_ANS_PAM_RESPOND = 109, | ||||
MONITOR_REQ_PAM_FREE_CTX = 110, MONITOR_ANS_PAM_FREE_CTX = 111, | MONITOR_REQ_PAM_FREE_CTX = 110, MONITOR_ANS_PAM_FREE_CTX = 111, | ||||
MONITOR_REQ_AUDIT_EVENT = 112, MONITOR_REQ_AUDIT_COMMAND = 113, | MONITOR_REQ_AUDIT_EVENT = 112, MONITOR_REQ_AUDIT_COMMAND = 113, | ||||
}; | }; | ||||
struct ssh; | |||||
struct monitor { | struct monitor { | ||||
int m_recvfd; | int m_recvfd; | ||||
int m_sendfd; | int m_sendfd; | ||||
int m_log_recvfd; | int m_log_recvfd; | ||||
int m_log_sendfd; | int m_log_sendfd; | ||||
struct kex **m_pkex; | struct kex **m_pkex; | ||||
pid_t m_pid; | pid_t m_pid; | ||||
}; | }; | ||||
struct monitor *monitor_init(void); | struct monitor *monitor_init(void); | ||||
void monitor_reinit(struct monitor *); | void monitor_reinit(struct monitor *); | ||||
struct Authctxt; | struct Authctxt; | ||||
void monitor_child_preauth(struct Authctxt *, struct monitor *); | void monitor_child_preauth(struct ssh *, struct monitor *); | ||||
void monitor_child_postauth(struct monitor *); | void monitor_child_postauth(struct ssh *, struct monitor *); | ||||
struct mon_table; | void monitor_clear_keystate(struct ssh *, struct monitor *); | ||||
int monitor_read(struct monitor*, struct mon_table *, struct mon_table **); | void monitor_apply_keystate(struct ssh *, struct monitor *); | ||||
/* Prototypes for request sending and receiving */ | /* Prototypes for request sending and receiving */ | ||||
void mm_request_send(int, enum monitor_reqtype, struct sshbuf *); | void mm_request_send(int, enum monitor_reqtype, struct sshbuf *); | ||||
void mm_request_receive(int, struct sshbuf *); | void mm_request_receive(int, struct sshbuf *); | ||||
void mm_request_receive_expect(int, enum monitor_reqtype, struct sshbuf *); | void mm_request_receive_expect(int, enum monitor_reqtype, struct sshbuf *); | ||||
void mm_get_keystate(struct ssh *, struct monitor *); | |||||
#endif /* _MONITOR_H_ */ | #endif /* _MONITOR_H_ */ |