|
Lines 89-94
Link Here
|
| 89 |
#include "ssh2.h" |
89 |
#include "ssh2.h" |
| 90 |
#include "jpake.h" |
90 |
#include "jpake.h" |
| 91 |
#include "roaming.h" |
91 |
#include "roaming.h" |
|
|
92 |
#include "audit.h" |
| 92 |
|
93 |
|
| 93 |
#ifdef GSSAPI |
94 |
#ifdef GSSAPI |
| 94 |
static Gssctxt *gsscontext = NULL; |
95 |
static Gssctxt *gsscontext = NULL; |
|
Lines 177-182
int mm_answer_gss_checkmic(int, Buffer *
Link Here
|
| 177 |
#ifdef SSH_AUDIT_EVENTS |
178 |
#ifdef SSH_AUDIT_EVENTS |
| 178 |
int mm_answer_audit_event(int, Buffer *); |
179 |
int mm_answer_audit_event(int, Buffer *); |
| 179 |
int mm_answer_audit_command(int, Buffer *); |
180 |
int mm_answer_audit_command(int, Buffer *); |
|
|
181 |
int mm_answer_audit_unsupported_body(int, Buffer *); |
| 182 |
int mm_answer_audit_kex_body(int, Buffer *); |
| 180 |
#endif |
183 |
#endif |
| 181 |
|
184 |
|
| 182 |
static Authctxt *authctxt; |
185 |
static Authctxt *authctxt; |
|
Lines 225-230
struct mon_table mon_dispatch_proto20[]
Link Here
|
| 225 |
#endif |
228 |
#endif |
| 226 |
#ifdef SSH_AUDIT_EVENTS |
229 |
#ifdef SSH_AUDIT_EVENTS |
| 227 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
230 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
|
|
231 |
{MONITOR_REQ_AUDIT_UNSUPPORTED, MON_PERMIT, mm_answer_audit_unsupported_body}, |
| 232 |
{MONITOR_REQ_AUDIT_KEX, MON_PERMIT, mm_answer_audit_kex_body}, |
| 228 |
#endif |
233 |
#endif |
| 229 |
#ifdef BSD_AUTH |
234 |
#ifdef BSD_AUTH |
| 230 |
{MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, |
235 |
{MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, |
|
Lines 261-266
struct mon_table mon_dispatch_postauth20
Link Here
|
| 261 |
#ifdef SSH_AUDIT_EVENTS |
266 |
#ifdef SSH_AUDIT_EVENTS |
| 262 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
267 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
| 263 |
{MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command}, |
268 |
{MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command}, |
|
|
269 |
{MONITOR_REQ_AUDIT_UNSUPPORTED, MON_PERMIT, mm_answer_audit_unsupported_body}, |
| 270 |
{MONITOR_REQ_AUDIT_KEX, MON_PERMIT, mm_answer_audit_kex_body}, |
| 264 |
#endif |
271 |
#endif |
| 265 |
{0, 0, NULL} |
272 |
{0, 0, NULL} |
| 266 |
}; |
273 |
}; |
|
Lines 292-297
struct mon_table mon_dispatch_proto15[]
Link Here
|
| 292 |
#endif |
299 |
#endif |
| 293 |
#ifdef SSH_AUDIT_EVENTS |
300 |
#ifdef SSH_AUDIT_EVENTS |
| 294 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
301 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
|
|
302 |
{MONITOR_REQ_AUDIT_UNSUPPORTED, MON_PERMIT, mm_answer_audit_unsupported_body}, |
| 303 |
{MONITOR_REQ_AUDIT_KEX, MON_PERMIT, mm_answer_audit_kex_body}, |
| 295 |
#endif |
304 |
#endif |
| 296 |
{0, 0, NULL} |
305 |
{0, 0, NULL} |
| 297 |
}; |
306 |
}; |
|
Lines 303-308
struct mon_table mon_dispatch_postauth15
Link Here
|
| 303 |
#ifdef SSH_AUDIT_EVENTS |
312 |
#ifdef SSH_AUDIT_EVENTS |
| 304 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
313 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
| 305 |
{MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command}, |
314 |
{MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command}, |
|
|
315 |
{MONITOR_REQ_AUDIT_UNSUPPORTED, MON_PERMIT, mm_answer_audit_unsupported_body}, |
| 316 |
{MONITOR_REQ_AUDIT_KEX, MON_PERMIT, mm_answer_audit_kex_body}, |
| 306 |
#endif |
317 |
#endif |
| 307 |
{0, 0, NULL} |
318 |
{0, 0, NULL} |
| 308 |
}; |
319 |
}; |
|
Lines 2205-2207
mm_answer_jpake_check_confirm(int sock,
Link Here
|
| 2205 |
} |
2216 |
} |
| 2206 |
|
2217 |
|
| 2207 |
#endif /* JPAKE */ |
2218 |
#endif /* JPAKE */ |
|
|
2219 |
|
| 2220 |
#ifdef SSH_AUDIT_EVENTS |
| 2221 |
int |
| 2222 |
mm_answer_audit_unsupported_body(int sock, Buffer *m) |
| 2223 |
{ |
| 2224 |
int what; |
| 2225 |
|
| 2226 |
what = buffer_get_int(m); |
| 2227 |
|
| 2228 |
audit_unsupported_body(what); |
| 2229 |
|
| 2230 |
buffer_clear(m); |
| 2231 |
|
| 2232 |
mm_request_send(sock, MONITOR_ANS_AUDIT_UNSUPPORTED, m); |
| 2233 |
return 0; |
| 2234 |
} |
| 2235 |
|
| 2236 |
int |
| 2237 |
mm_answer_audit_kex_body(int sock, Buffer *m) |
| 2238 |
{ |
| 2239 |
int ctos, len; |
| 2240 |
char *cipher, *mac, *compress; |
| 2241 |
|
| 2242 |
ctos = buffer_get_int(m); |
| 2243 |
cipher = buffer_get_string(m, &len); |
| 2244 |
mac = buffer_get_string(m, &len); |
| 2245 |
compress = buffer_get_string(m, &len); |
| 2246 |
|
| 2247 |
audit_kex_body(ctos, cipher, mac, compress); |
| 2248 |
|
| 2249 |
buffer_clear(m); |
| 2250 |
|
| 2251 |
mm_request_send(sock, MONITOR_ANS_AUDIT_KEX, m); |
| 2252 |
return 0; |
| 2253 |
} |
| 2254 |
|
| 2255 |
#endif /* SSH_AUDIT_EVENTS */ |