Deleted Added
sdiff udiff text old ( 192595 ) new ( 197679 )
full compact
1/* $OpenBSD: monitor.c,v 1.101 2009/02/12 03:26:22 djm Exp $ */
2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 73 unchanged lines hidden (view full) ---

83#include "ssh-gss.h"
84#endif
85#include "monitor_wrap.h"
86#include "monitor_fdpass.h"
87#include "misc.h"
88#include "compat.h"
89#include "ssh2.h"
90#include "jpake.h"
91
92#ifdef GSSAPI
93static Gssctxt *gsscontext = NULL;
94#endif
95
96/* Imports */
97extern ServerOptions options;
98extern u_int utmp_len;
99extern Newkeys *current_keys[];
100extern z_stream incoming_stream;
101extern z_stream outgoing_stream;
102extern u_char session_id[];
103extern Buffer input, output;
104extern Buffer auth_debug;
105extern int auth_debug_init;
106extern Buffer loginmsg;
107
108/* State exported from the child */
109
110struct {
111 z_stream incoming;

--- 9 unchanged lines hidden (view full) ---

121 u_char *ssh1key;
122 u_int ssh1keylen;
123 int ssh1cipher;
124 int ssh1protoflags;
125 u_char *input;
126 u_int ilen;
127 u_char *output;
128 u_int olen;
129} child_state;
130
131/* Functions on the monitor that answer unprivileged requests */
132
133int mm_answer_moduli(int, Buffer *);
134int mm_answer_sign(int, Buffer *);
135int mm_answer_pwnamallow(int, Buffer *);
136int mm_answer_auth2_read_banner(int, Buffer *);

--- 1528 unchanged lines hidden (view full) ---

1665 sizeof(outgoing_stream));
1666
1667 /* Update with new address */
1668 if (options.compression)
1669 mm_init_compression(pmonitor->m_zlib);
1670
1671 /* Network I/O buffers */
1672 /* XXX inefficient for large buffers, need: buffer_init_from_string */
1673 buffer_clear(&input);
1674 buffer_append(&input, child_state.input, child_state.ilen);
1675 memset(child_state.input, 0, child_state.ilen);
1676 xfree(child_state.input);
1677
1678 buffer_clear(&output);
1679 buffer_append(&output, child_state.output, child_state.olen);
1680 memset(child_state.output, 0, child_state.olen);
1681 xfree(child_state.output);
1682}
1683
1684static Kex *
1685mm_get_kex(Buffer *m)
1686{
1687 Kex *kex;
1688 void *blob;
1689 u_int bloblen;

--- 99 unchanged lines hidden (view full) ---

1789 memcpy(&child_state.incoming, p, sizeof(child_state.incoming));
1790 xfree(p);
1791
1792 /* Network I/O buffers */
1793 debug3("%s: Getting Network I/O buffers", __func__);
1794 child_state.input = buffer_get_string(&m, &child_state.ilen);
1795 child_state.output = buffer_get_string(&m, &child_state.olen);
1796
1797 buffer_free(&m);
1798}
1799
1800
1801/* Allocation functions for zlib */
1802void *
1803mm_zalloc(struct mm_master *mm, u_int ncount, u_int size)
1804{

--- 394 unchanged lines hidden ---