|
Lines 143-148
int mm_answer_gss_userok(int, Buffer *);
Link Here
|
| 143 |
int mm_answer_gss_checkmic(int, Buffer *); |
143 |
int mm_answer_gss_checkmic(int, Buffer *); |
| 144 |
#endif |
144 |
#endif |
| 145 |
|
145 |
|
|
|
146 |
#ifdef AUDIT_EVENTS |
| 147 |
int mm_answer_audit_event(int, Buffer *); |
| 148 |
int mm_answer_audit_command(int, Buffer *); |
| 149 |
#endif |
| 150 |
|
| 146 |
static Authctxt *authctxt; |
151 |
static Authctxt *authctxt; |
| 147 |
static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */ |
152 |
static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */ |
| 148 |
|
153 |
|
|
Lines 186-191
struct mon_table mon_dispatch_proto20[]
Link Here
|
| 186 |
{MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond}, |
191 |
{MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond}, |
| 187 |
{MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx}, |
192 |
{MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx}, |
| 188 |
#endif |
193 |
#endif |
|
|
194 |
#ifdef AUDIT_EVENTS |
| 195 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
| 196 |
#endif |
| 189 |
#ifdef BSD_AUTH |
197 |
#ifdef BSD_AUTH |
| 190 |
{MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, |
198 |
{MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, |
| 191 |
{MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond}, |
199 |
{MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond}, |
|
Lines 211-216
struct mon_table mon_dispatch_postauth20
Link Here
|
| 211 |
{MONITOR_REQ_PTY, 0, mm_answer_pty}, |
219 |
{MONITOR_REQ_PTY, 0, mm_answer_pty}, |
| 212 |
{MONITOR_REQ_PTYCLEANUP, 0, mm_answer_pty_cleanup}, |
220 |
{MONITOR_REQ_PTYCLEANUP, 0, mm_answer_pty_cleanup}, |
| 213 |
{MONITOR_REQ_TERM, 0, mm_answer_term}, |
221 |
{MONITOR_REQ_TERM, 0, mm_answer_term}, |
|
|
222 |
#ifdef AUDIT_EVENTS |
| 223 |
{MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, |
| 224 |
{MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command}, |
| 225 |
#endif |
| 214 |
{0, 0, NULL} |
226 |
{0, 0, NULL} |
| 215 |
}; |
227 |
}; |
| 216 |
|
228 |
|
|
Lines 1490-1495
mm_answer_term(int sock, Buffer *req)
Link Here
|
| 1490 |
/* Terminate process */ |
1502 |
/* Terminate process */ |
| 1491 |
exit(res); |
1503 |
exit(res); |
| 1492 |
} |
1504 |
} |
|
|
1505 |
|
| 1506 |
#ifdef AUDIT_EVENTS |
| 1507 |
/* Report that an audit event occurred */ |
| 1508 |
int |
| 1509 |
mm_answer_audit_event(int socket, Buffer *m) |
| 1510 |
{ |
| 1511 |
enum audit_event_type event; |
| 1512 |
|
| 1513 |
debug3("%s entering", __func__); |
| 1514 |
|
| 1515 |
event = buffer_get_int(m); |
| 1516 |
buffer_free(m); |
| 1517 |
switch(event) { |
| 1518 |
case NOLOGIN: |
| 1519 |
case AUTH_FAILED: |
| 1520 |
case LOGIN_EXCEED_MAXTRIES: |
| 1521 |
audit_event(event); |
| 1522 |
break; |
| 1523 |
default: |
| 1524 |
fatal("Audit event type %d not permitted", event); |
| 1525 |
} |
| 1526 |
|
| 1527 |
return (0); |
| 1528 |
} |
| 1529 |
|
| 1530 |
int |
| 1531 |
mm_answer_audit_command(int socket, Buffer *m) |
| 1532 |
{ |
| 1533 |
u_int len; |
| 1534 |
char *cmd; |
| 1535 |
|
| 1536 |
debug3("%s entering", __func__); |
| 1537 |
cmd = buffer_get_string(m, &len); |
| 1538 |
/* sanity check command, if so how? */ |
| 1539 |
buffer_free(m); |
| 1540 |
audit_run_command(cmd); |
| 1541 |
xfree(cmd); |
| 1542 |
return (0); |
| 1543 |
} |
| 1544 |
#endif /* AUDIT_EVENTS */ |
| 1493 |
|
1545 |
|
| 1494 |
void |
1546 |
void |
| 1495 |
monitor_apply_keystate(struct monitor *pmonitor) |
1547 |
monitor_apply_keystate(struct monitor *pmonitor) |