summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/monitor.c')
-rw-r--r--usr.bin/ssh/monitor.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c
index 356ada6d022..facd5b2d91a 100644
--- a/usr.bin/ssh/monitor.c
+++ b/usr.bin/ssh/monitor.c
@@ -25,7 +25,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: monitor.c,v 1.58 2004/06/13 12:53:24 djm Exp $");
+RCSID("$OpenBSD: monitor.c,v 1.59 2004/06/21 17:36:31 avsm Exp $");
#include <openssl/dh.h>
@@ -307,9 +307,9 @@ monitor_set_child_handler(pid_t pid)
}
static void
-monitor_child_handler(int signal)
+monitor_child_handler(int sig)
{
- kill(monitor_child_pid, signal);
+ kill(monitor_child_pid, sig);
}
void
@@ -424,7 +424,7 @@ monitor_reset_key_state(void)
}
int
-mm_answer_moduli(int socket, Buffer *m)
+mm_answer_moduli(int sock, Buffer *m)
{
DH *dh;
int min, want, max;
@@ -454,12 +454,12 @@ mm_answer_moduli(int socket, Buffer *m)
DH_free(dh);
}
- mm_request_send(socket, MONITOR_ANS_MODULI, m);
+ mm_request_send(sock, MONITOR_ANS_MODULI, m);
return (0);
}
int
-mm_answer_sign(int socket, Buffer *m)
+mm_answer_sign(int sock, Buffer *m)
{
Key *key;
u_char *p;
@@ -495,7 +495,7 @@ mm_answer_sign(int socket, Buffer *m)
xfree(p);
xfree(signature);
- mm_request_send(socket, MONITOR_ANS_SIGN, m);
+ mm_request_send(sock, MONITOR_ANS_SIGN, m);
/* Turn on permissions for getpwnam */
monitor_permit(mon_dispatch, MONITOR_REQ_PWNAM, 1);
@@ -506,7 +506,7 @@ mm_answer_sign(int socket, Buffer *m)
/* Retrieves the password entry and also checks if the user is permitted */
int
-mm_answer_pwnamallow(int socket, Buffer *m)
+mm_answer_pwnamallow(int sock, Buffer *m)
{
char *login;
struct passwd *pwent;
@@ -548,7 +548,7 @@ mm_answer_pwnamallow(int socket, Buffer *m)
out:
debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed);
- mm_request_send(socket, MONITOR_ANS_PWNAM, m);
+ mm_request_send(sock, MONITOR_ANS_PWNAM, m);
/* For SSHv1 allow authentication now */
if (!compat20)
@@ -563,14 +563,14 @@ mm_answer_pwnamallow(int socket, Buffer *m)
return (0);
}
-int mm_answer_auth2_read_banner(int socket, Buffer *m)
+int mm_answer_auth2_read_banner(int sock, Buffer *m)
{
char *banner;
buffer_clear(m);
banner = auth2_read_banner();
buffer_put_cstring(m, banner != NULL ? banner : "");
- mm_request_send(socket, MONITOR_ANS_AUTH2_READ_BANNER, m);
+ mm_request_send(sock, MONITOR_ANS_AUTH2_READ_BANNER, m);
if (banner != NULL)
xfree(banner);
@@ -579,7 +579,7 @@ int mm_answer_auth2_read_banner(int socket, Buffer *m)
}
int
-mm_answer_authserv(int socket, Buffer *m)
+mm_answer_authserv(int sock, Buffer *m)
{
monitor_permit_authentications(1);
@@ -597,7 +597,7 @@ mm_answer_authserv(int socket, Buffer *m)
}
int
-mm_answer_authpassword(int socket, Buffer *m)
+mm_answer_authpassword(int sock, Buffer *m)
{
static int call_count;
char *passwd;
@@ -615,7 +615,7 @@ mm_answer_authpassword(int socket, Buffer *m)
buffer_put_int(m, authenticated);
debug3("%s: sending result %d", __func__, authenticated);
- mm_request_send(socket, MONITOR_ANS_AUTHPASSWORD, m);
+ mm_request_send(sock, MONITOR_ANS_AUTHPASSWORD, m);
call_count++;
if (plen == 0 && call_count == 1)
@@ -629,7 +629,7 @@ mm_answer_authpassword(int socket, Buffer *m)
#ifdef BSD_AUTH
int
-mm_answer_bsdauthquery(int socket, Buffer *m)
+mm_answer_bsdauthquery(int sock, Buffer *m)
{
char *name, *infotxt;
u_int numprompts;
@@ -646,7 +646,7 @@ mm_answer_bsdauthquery(int socket, Buffer *m)
buffer_put_cstring(m, prompts[0]);
debug3("%s: sending challenge success: %u", __func__, success);
- mm_request_send(socket, MONITOR_ANS_BSDAUTHQUERY, m);
+ mm_request_send(sock, MONITOR_ANS_BSDAUTHQUERY, m);
if (success) {
xfree(name);
@@ -659,7 +659,7 @@ mm_answer_bsdauthquery(int socket, Buffer *m)
}
int
-mm_answer_bsdauthrespond(int socket, Buffer *m)
+mm_answer_bsdauthrespond(int sock, Buffer *m)
{
char *response;
int authok;
@@ -678,7 +678,7 @@ mm_answer_bsdauthrespond(int socket, Buffer *m)
buffer_put_int(m, authok);
debug3("%s: sending authenticated: %d", __func__, authok);
- mm_request_send(socket, MONITOR_ANS_BSDAUTHRESPOND, m);
+ mm_request_send(sock, MONITOR_ANS_BSDAUTHRESPOND, m);
auth_method = "bsdauth";
@@ -688,7 +688,7 @@ mm_answer_bsdauthrespond(int socket, Buffer *m)
#ifdef SKEY
int
-mm_answer_skeyquery(int socket, Buffer *m)
+mm_answer_skeyquery(int sock, Buffer *m)
{
struct skey skey;
char challenge[1024];
@@ -702,13 +702,13 @@ mm_answer_skeyquery(int socket, Buffer *m)
buffer_put_cstring(m, challenge);
debug3("%s: sending challenge success: %u", __func__, success);
- mm_request_send(socket, MONITOR_ANS_SKEYQUERY, m);
+ mm_request_send(sock, MONITOR_ANS_SKEYQUERY, m);
return (0);
}
int
-mm_answer_skeyrespond(int socket, Buffer *m)
+mm_answer_skeyrespond(int sock, Buffer *m)
{
char *response;
int authok;
@@ -726,7 +726,7 @@ mm_answer_skeyrespond(int socket, Buffer *m)
buffer_put_int(m, authok);
debug3("%s: sending authenticated: %d", __func__, authok);
- mm_request_send(socket, MONITOR_ANS_SKEYRESPOND, m);
+ mm_request_send(sock, MONITOR_ANS_SKEYRESPOND, m);
auth_method = "skey";
@@ -746,7 +746,7 @@ mm_append_debug(Buffer *m)
}
int
-mm_answer_keyallowed(int socket, Buffer *m)
+mm_answer_keyallowed(int sock, Buffer *m)
{
Key *key;
char *cuser, *chost;
@@ -816,7 +816,7 @@ mm_answer_keyallowed(int socket, Buffer *m)
mm_append_debug(m);
- mm_request_send(socket, MONITOR_ANS_KEYALLOWED, m);
+ mm_request_send(sock, MONITOR_ANS_KEYALLOWED, m);
if (type == MM_RSAHOSTKEY)
monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
@@ -937,7 +937,7 @@ monitor_valid_hostbasedblob(u_char *data, u_int datalen, char *cuser,
}
int
-mm_answer_keyverify(int socket, Buffer *m)
+mm_answer_keyverify(int sock, Buffer *m)
{
Key *key;
u_char *signature, *data, *blob;
@@ -987,7 +987,7 @@ mm_answer_keyverify(int socket, Buffer *m)
buffer_clear(m);
buffer_put_int(m, verified);
- mm_request_send(socket, MONITOR_ANS_KEYVERIFY, m);
+ mm_request_send(sock, MONITOR_ANS_KEYVERIFY, m);
return (verified);
}
@@ -1029,7 +1029,7 @@ mm_session_close(Session *s)
}
int
-mm_answer_pty(int socket, Buffer *m)
+mm_answer_pty(int sock, Buffer *m)
{
extern struct monitor *pmonitor;
Session *s;
@@ -1051,10 +1051,10 @@ mm_answer_pty(int socket, Buffer *m)
buffer_put_int(m, 1);
buffer_put_cstring(m, s->tty);
- mm_request_send(socket, MONITOR_ANS_PTY, m);
+ mm_request_send(sock, MONITOR_ANS_PTY, m);
- mm_send_fd(socket, s->ptyfd);
- mm_send_fd(socket, s->ttyfd);
+ mm_send_fd(sock, s->ptyfd);
+ mm_send_fd(sock, s->ttyfd);
/* We need to trick ttyslot */
if (dup2(s->ttyfd, 0) == -1)
@@ -1085,12 +1085,12 @@ mm_answer_pty(int socket, Buffer *m)
if (s != NULL)
mm_session_close(s);
buffer_put_int(m, 0);
- mm_request_send(socket, MONITOR_ANS_PTY, m);
+ mm_request_send(sock, MONITOR_ANS_PTY, m);
return (0);
}
int
-mm_answer_pty_cleanup(int socket, Buffer *m)
+mm_answer_pty_cleanup(int sock, Buffer *m)
{
Session *s;
char *tty;
@@ -1106,7 +1106,7 @@ mm_answer_pty_cleanup(int socket, Buffer *m)
}
int
-mm_answer_sesskey(int socket, Buffer *m)
+mm_answer_sesskey(int sock, Buffer *m)
{
BIGNUM *p;
int rsafail;
@@ -1127,7 +1127,7 @@ mm_answer_sesskey(int socket, Buffer *m)
BN_clear_free(p);
- mm_request_send(socket, MONITOR_ANS_SESSKEY, m);
+ mm_request_send(sock, MONITOR_ANS_SESSKEY, m);
/* Turn on permissions for sessid passing */
monitor_permit(mon_dispatch, MONITOR_REQ_SESSID, 1);
@@ -1136,7 +1136,7 @@ mm_answer_sesskey(int socket, Buffer *m)
}
int
-mm_answer_sessid(int socket, Buffer *m)
+mm_answer_sessid(int sock, Buffer *m)
{
int i;
@@ -1154,7 +1154,7 @@ mm_answer_sessid(int socket, Buffer *m)
}
int
-mm_answer_rsa_keyallowed(int socket, Buffer *m)
+mm_answer_rsa_keyallowed(int sock, Buffer *m)
{
BIGNUM *client_n;
Key *key = NULL;
@@ -1194,7 +1194,7 @@ mm_answer_rsa_keyallowed(int socket, Buffer *m)
mm_append_debug(m);
- mm_request_send(socket, MONITOR_ANS_RSAKEYALLOWED, m);
+ mm_request_send(sock, MONITOR_ANS_RSAKEYALLOWED, m);
monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 0);
@@ -1202,7 +1202,7 @@ mm_answer_rsa_keyallowed(int socket, Buffer *m)
}
int
-mm_answer_rsa_challenge(int socket, Buffer *m)
+mm_answer_rsa_challenge(int sock, Buffer *m)
{
Key *key = NULL;
u_char *blob;
@@ -1228,7 +1228,7 @@ mm_answer_rsa_challenge(int socket, Buffer *m)
buffer_put_bignum2(m, ssh1_challenge);
debug3("%s sending reply", __func__);
- mm_request_send(socket, MONITOR_ANS_RSACHALLENGE, m);
+ mm_request_send(sock, MONITOR_ANS_RSACHALLENGE, m);
monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 1);
@@ -1238,7 +1238,7 @@ mm_answer_rsa_challenge(int socket, Buffer *m)
}
int
-mm_answer_rsa_response(int socket, Buffer *m)
+mm_answer_rsa_response(int sock, Buffer *m)
{
Key *key = NULL;
u_char *blob, *response;
@@ -1277,13 +1277,13 @@ mm_answer_rsa_response(int socket, Buffer *m)
buffer_clear(m);
buffer_put_int(m, success);
- mm_request_send(socket, MONITOR_ANS_RSARESPONSE, m);
+ mm_request_send(sock, MONITOR_ANS_RSARESPONSE, m);
return (success);
}
int
-mm_answer_term(int socket, Buffer *req)
+mm_answer_term(int sock, Buffer *req)
{
extern struct monitor *pmonitor;
int res, status;
@@ -1556,23 +1556,23 @@ monitor_reinit(struct monitor *mon)
#ifdef GSSAPI
int
-mm_answer_gss_setup_ctx(int socket, Buffer *m)
+mm_answer_gss_setup_ctx(int sock, Buffer *m)
{
- gss_OID_desc oid;
+ gss_OID_desc goid;
OM_uint32 major;
u_int len;
- oid.elements = buffer_get_string(m, &len);
- oid.length = len;
+ goid.elements = buffer_get_string(m, &len);
+ goid.length = len;
- major = ssh_gssapi_server_ctx(&gsscontext, &oid);
+ major = ssh_gssapi_server_ctx(&gsscontext, &goid);
- xfree(oid.elements);
+ xfree(goid.elements);
buffer_clear(m);
buffer_put_int(m, major);
- mm_request_send(socket,MONITOR_ANS_GSSSETUP, m);
+ mm_request_send(sock,MONITOR_ANS_GSSSETUP, m);
/* Now we have a context, enable the step */
monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 1);
@@ -1581,7 +1581,7 @@ mm_answer_gss_setup_ctx(int socket, Buffer *m)
}
int
-mm_answer_gss_accept_ctx(int socket, Buffer *m)
+mm_answer_gss_accept_ctx(int sock, Buffer *m)
{
gss_buffer_desc in;
gss_buffer_desc out = GSS_C_EMPTY_BUFFER;
@@ -1598,7 +1598,7 @@ mm_answer_gss_accept_ctx(int socket, Buffer *m)
buffer_put_int(m, major);
buffer_put_string(m, out.value, out.length);
buffer_put_int(m, flags);
- mm_request_send(socket, MONITOR_ANS_GSSSTEP, m);
+ mm_request_send(sock, MONITOR_ANS_GSSSTEP, m);
gss_release_buffer(&minor, &out);
@@ -1611,7 +1611,7 @@ mm_answer_gss_accept_ctx(int socket, Buffer *m)
}
int
-mm_answer_gss_checkmic(int socket, Buffer *m)
+mm_answer_gss_checkmic(int sock, Buffer *m)
{
gss_buffer_desc gssbuf, mic;
OM_uint32 ret;
@@ -1630,7 +1630,7 @@ mm_answer_gss_checkmic(int socket, Buffer *m)
buffer_clear(m);
buffer_put_int(m, ret);
- mm_request_send(socket, MONITOR_ANS_GSSCHECKMIC, m);
+ mm_request_send(sock, MONITOR_ANS_GSSCHECKMIC, m);
if (!GSS_ERROR(ret))
monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1);
@@ -1639,7 +1639,7 @@ mm_answer_gss_checkmic(int socket, Buffer *m)
}
int
-mm_answer_gss_userok(int socket, Buffer *m)
+mm_answer_gss_userok(int sock, Buffer *m)
{
int authenticated;
@@ -1649,7 +1649,7 @@ mm_answer_gss_userok(int socket, Buffer *m)
buffer_put_int(m, authenticated);
debug3("%s: sending result %d", __func__, authenticated);
- mm_request_send(socket, MONITOR_ANS_GSSUSEROK, m);
+ mm_request_send(sock, MONITOR_ANS_GSSUSEROK, m);
auth_method="gssapi-with-mic";