diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-05-15 16:25:01 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-05-15 16:25:01 +0000 |
commit | 7339b2a27868557ffcfea6cd7908323bca4f7a3a (patch) | |
tree | 85bf536e7bab841860f4a65d63717278b6ab8c72 /monitor.c | |
parent | bdde330d2fb2a2ccc50659a592da5241f673b6d1 (diff) |
- mouring@cvs.openbsd.org 2002/05/15 15:47:49
[kex.c monitor.c monitor_wrap.c sshd.c]
'monitor' variable clashes with at least one lame platform (NeXT). i
Renamed to 'pmonitor'. provos@
- (bal) Fixed up PAM case. I think.
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor.c,v 1.10 2002/05/12 23:53:45 djm Exp $"); +RCSID("$OpenBSD: monitor.c,v 1.11 2002/05/15 15:47:49 mouring Exp $"); #include <openssl/dh.h> @@ -240,7 +240,7 @@ monitor_permit_authentications(int permit) } Authctxt * -monitor_child_preauth(struct monitor *monitor) +monitor_child_preauth(struct monitor *pmonitor) { struct mon_table *ent; int authenticated = 0; @@ -263,7 +263,7 @@ monitor_child_preauth(struct monitor *monitor) /* The first few requests do not require asynchronous access */ while (!authenticated) { - authenticated = monitor_read(monitor, mon_dispatch, &ent); + authenticated = monitor_read(pmonitor, mon_dispatch, &ent); if (authenticated) { if (!(ent->flags & MON_AUTHDECIDE)) fatal("%s: unexpected authentication from %d", @@ -291,13 +291,13 @@ monitor_child_preauth(struct monitor *monitor) debug("%s: %s has been authenticated by privileged process", __FUNCTION__, authctxt->user); - mm_get_keystate(monitor); + mm_get_keystate(pmonitor); return (authctxt); } void -monitor_child_postauth(struct monitor *monitor) +monitor_child_postauth(struct monitor *pmonitor) { if (compat20) { mon_dispatch = mon_dispatch_postauth20; @@ -317,18 +317,18 @@ monitor_child_postauth(struct monitor *monitor) } for (;;) - monitor_read(monitor, mon_dispatch, NULL); + monitor_read(pmonitor, mon_dispatch, NULL); } void -monitor_sync(struct monitor *monitor) +monitor_sync(struct monitor *pmonitor) { /* The member allocation is not visible, so sync it */ - mm_share_sync(&monitor->m_zlib, &monitor->m_zback); + mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback); } int -monitor_read(struct monitor *monitor, struct mon_table *ent, +monitor_read(struct monitor *pmonitor, struct mon_table *ent, struct mon_table **pent) { Buffer m; @@ -337,7 +337,7 @@ monitor_read(struct monitor *monitor, struct mon_table *ent, buffer_init(&m); - mm_request_receive(monitor->m_sendfd, &m); + mm_request_receive(pmonitor->m_sendfd, &m); type = buffer_get_char(&m); debug3("%s: checking request %d", __FUNCTION__, type); @@ -352,7 +352,7 @@ monitor_read(struct monitor *monitor, struct mon_table *ent, if (!(ent->flags & MON_PERMIT)) fatal("%s: unpermitted request %d", __FUNCTION__, type); - ret = (*ent->f)(monitor->m_sendfd, &m); + ret = (*ent->f)(pmonitor->m_sendfd, &m); buffer_free(&m); /* The child may use this request only once, disable it */ @@ -1003,7 +1003,7 @@ mm_session_close(Session *s) int mm_answer_pty(int socket, Buffer *m) { - extern struct monitor *monitor; + extern struct monitor *pmonitor; Session *s; int res, fd0; @@ -1015,7 +1015,7 @@ mm_answer_pty(int socket, Buffer *m) goto error; s->authctxt = authctxt; s->pw = authctxt->pw; - s->pid = monitor->m_pid; + s->pid = pmonitor->m_pid; res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); if (res == 0) goto error; @@ -1252,7 +1252,7 @@ mm_answer_rsa_response(int socket, Buffer *m) int mm_answer_term(int socket, Buffer *req) { - extern struct monitor *monitor; + extern struct monitor *pmonitor; int res, status; debug3("%s: tearing down sessions", __FUNCTION__); @@ -1260,7 +1260,7 @@ mm_answer_term(int socket, Buffer *req) /* The child is terminating */ session_destroy_all(&mm_session_close); - while (waitpid(monitor->m_pid, &status, 0) == -1) + while (waitpid(pmonitor->m_pid, &status, 0) == -1) if (errno != EINTR) exit(1); @@ -1271,7 +1271,7 @@ mm_answer_term(int socket, Buffer *req) } void -monitor_apply_keystate(struct monitor *monitor) +monitor_apply_keystate(struct monitor *pmonitor) { if (compat20) { set_newkeys(MODE_IN); @@ -1303,7 +1303,7 @@ monitor_apply_keystate(struct monitor *monitor) sizeof(outgoing_stream)); /* Update with new address */ - mm_init_compression(monitor->m_zlib); + mm_init_compression(pmonitor->m_zlib); /* Network I/O buffers */ /* XXX inefficient for large buffers, need: buffer_init_from_string */ @@ -1353,7 +1353,7 @@ mm_get_kex(Buffer *m) /* This function requries careful sanity checking */ void -mm_get_keystate(struct monitor *monitor) +mm_get_keystate(struct monitor *pmonitor) { Buffer m; u_char *blob, *p; @@ -1362,7 +1362,7 @@ mm_get_keystate(struct monitor *monitor) debug3("%s: Waiting for new keys", __FUNCTION__); buffer_init(&m); - mm_request_receive_expect(monitor->m_sendfd, MONITOR_REQ_KEYEXPORT, &m); + mm_request_receive_expect(pmonitor->m_sendfd, MONITOR_REQ_KEYEXPORT, &m); if (!compat20) { child_state.ssh1protoflags = buffer_get_int(&m); child_state.ssh1cipher = buffer_get_int(&m); @@ -1372,7 +1372,7 @@ mm_get_keystate(struct monitor *monitor) goto skip; } else { /* Get the Kex for rekeying */ - *monitor->m_pkex = mm_get_kex(&m); + *pmonitor->m_pkex = mm_get_kex(&m); } blob = buffer_get_string(&m, &bloblen); |