from www.openssh.org

This commit is contained in:
christos 2006-09-28 21:14:57 +00:00
parent 4fa11947d6
commit 49b7694919
26 changed files with 389 additions and 71 deletions

View File

@ -162,8 +162,7 @@ these programs.
- There are several other files in the distribution that contain
various auxiliary routines:
ssh.h the main header file for ssh (various definitions)
getput.h byte-order independent storage of integers
includes.h includes most system headers. Lots of #ifdefs.
tildexpand.c expand tilde in file names
uidswap.c uid-swapping
xmalloc.c "safe" malloc routines
$OpenBSD: OVERVIEW,v 1.11 2006/08/03 03:34:41 deraadt Exp $

View File

@ -23,3 +23,5 @@ features and created OpenSSH. Markus Friedl contributed the support
for SSH protocol versions 1.5 and 2.0.
See http://www.openssh.com/ for more information.
$OpenBSD: README,v 1.7 2006/04/01 05:37:46 djm Exp $

View File

@ -1,5 +1,5 @@
/* $NetBSD: authfd.h,v 1.1.1.11 2005/02/13 00:52:53 christos Exp $ */
/* $OpenBSD: authfd.h,v 1.34 2003/11/21 11:57:03 djm Exp $ */
/* $NetBSD: authfd.h,v 1.1.1.12 2006/09/28 21:15:01 christos Exp $ */
/* $OpenBSD: authfd.h,v 1.36 2006/08/03 03:34:41 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@ -17,8 +17,6 @@
#ifndef AUTHFD_H
#define AUTHFD_H
#include "buffer.h"
/* Messages for the authentication agent connection. */
#define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1
#define SSH_AGENT_RSA_IDENTITIES_ANSWER 2

View File

@ -1,5 +1,5 @@
/* $NetBSD: authfile.h,v 1.1.1.7 2002/06/24 05:25:43 itojun Exp $ */
/* $OpenBSD: authfile.h,v 1.10 2002/05/23 19:24:30 markus Exp $ */
/* $NetBSD: authfile.h,v 1.1.1.8 2006/09/28 21:15:01 christos Exp $ */
/* $OpenBSD: authfile.h,v 1.13 2006/04/25 08:02:27 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@ -20,7 +20,8 @@ int key_save_private(Key *, const char *, const char *, const char *);
Key *key_load_public(const char *, char **);
Key *key_load_public_type(int, const char *, char **);
Key *key_load_private(const char *, const char *, char **);
Key *key_load_private_type(int, const char *, const char *, char **);
Key *key_load_private_type(int, const char *, const char *, char **, int *);
Key *key_load_private_pem(int, int, const char *, char **);
int key_perm_ok(int, const char *);
#endif

214
crypto/dist/ssh/bufbn.c vendored Normal file
View File

@ -0,0 +1,214 @@
/* $NetBSD: bufbn.c,v 1.1.1.1 2006/09/28 21:15:01 christos Exp $ */
/* $OpenBSD: bufbn.c,v 1.3 2006/08/03 03:34:41 deraadt Exp $*/
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
* Auxiliary functions for storing and retrieving various data types to/from
* Buffers.
*
* As far as I am concerned, the code I have written for this software
* can be used freely for any purpose. Any derived versions of this
* software must be clearly marked as such, and if the derived work is
* incompatible with the protocol description in the RFC file, it must be
* called by a name other than "ssh" or "Secure Shell".
*
*
* SSH2 packet format added by Markus Friedl
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/types.h>
#include <openssl/bn.h>
#include <string.h>
#include <stdarg.h>
#include "xmalloc.h"
#include "buffer.h"
#include "log.h"
#include "misc.h"
/*
* Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed
* by (bits+7)/8 bytes of binary data, msb first.
*/
int
buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value)
{
int bits = BN_num_bits(value);
int bin_size = (bits + 7) / 8;
u_char *buf = xmalloc(bin_size);
int oi;
char msg[2];
/* Get the value of in binary */
oi = BN_bn2bin(value, buf);
if (oi != bin_size) {
error("buffer_put_bignum_ret: BN_bn2bin() failed: oi %d != bin_size %d",
oi, bin_size);
xfree(buf);
return (-1);
}
/* Store the number of bits in the buffer in two bytes, msb first. */
put_u16(msg, bits);
buffer_append(buffer, msg, 2);
/* Store the binary data. */
buffer_append(buffer, buf, oi);
memset(buf, 0, bin_size);
xfree(buf);
return (0);
}
void
buffer_put_bignum(Buffer *buffer, const BIGNUM *value)
{
if (buffer_put_bignum_ret(buffer, value) == -1)
fatal("buffer_put_bignum: buffer error");
}
/*
* Retrieves an BIGNUM from the buffer.
*/
int
buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value)
{
u_int bits, bytes;
u_char buf[2], *bin;
/* Get the number for bits. */
if (buffer_get_ret(buffer, (char *) buf, 2) == -1) {
error("buffer_get_bignum_ret: invalid length");
return (-1);
}
bits = get_u16(buf);
/* Compute the number of binary bytes that follow. */
bytes = (bits + 7) / 8;
if (bytes > 8 * 1024) {
error("buffer_get_bignum_ret: cannot handle BN of size %d", bytes);
return (-1);
}
if (buffer_len(buffer) < bytes) {
error("buffer_get_bignum_ret: input buffer too small");
return (-1);
}
bin = buffer_ptr(buffer);
BN_bin2bn(bin, bytes, value);
if (buffer_consume_ret(buffer, bytes) == -1) {
error("buffer_get_bignum_ret: buffer_consume failed");
return (-1);
}
return (0);
}
void
buffer_get_bignum(Buffer *buffer, BIGNUM *value)
{
if (buffer_get_bignum_ret(buffer, value) == -1)
fatal("buffer_get_bignum: buffer error");
}
/*
* Stores an BIGNUM in the buffer in SSH2 format.
*/
int
buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
{
u_int bytes;
u_char *buf;
int oi;
u_int hasnohigh = 0;
if (BN_is_zero(value)) {
buffer_put_int(buffer, 0);
return 0;
}
if (value->neg) {
error("buffer_put_bignum2_ret: negative numbers not supported");
return (-1);
}
bytes = BN_num_bytes(value) + 1; /* extra padding byte */
if (bytes < 2) {
error("buffer_put_bignum2_ret: BN too small");
return (-1);
}
buf = xmalloc(bytes);
buf[0] = 0x00;
/* Get the value of in binary */
oi = BN_bn2bin(value, buf+1);
if (oi < 0 || (u_int)oi != bytes - 1) {
error("buffer_put_bignum2_ret: BN_bn2bin() failed: "
"oi %d != bin_size %d", oi, bytes);
xfree(buf);
return (-1);
}
hasnohigh = (buf[1] & 0x80) ? 0 : 1;
buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh);
memset(buf, 0, bytes);
xfree(buf);
return (0);
}
void
buffer_put_bignum2(Buffer *buffer, const BIGNUM *value)
{
if (buffer_put_bignum2_ret(buffer, value) == -1)
fatal("buffer_put_bignum2: buffer error");
}
int
buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value)
{
u_int len;
u_char *bin;
if ((bin = buffer_get_string_ret(buffer, &len)) == NULL) {
error("buffer_get_bignum2_ret: invalid bignum");
return (-1);
}
if (len > 0 && (bin[0] & 0x80)) {
error("buffer_get_bignum2_ret: negative numbers not supported");
xfree(bin);
return (-1);
}
if (len > 8 * 1024) {
error("buffer_get_bignum2_ret: cannot handle BN of size %d", len);
xfree(bin);
return (-1);
}
BN_bin2bn(bin, len, value);
xfree(bin);
return (0);
}
void
buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
{
if (buffer_get_bignum2_ret(buffer, value) == -1)
fatal("buffer_get_bignum2: buffer error");
}

View File

@ -1,4 +1,5 @@
/* $NetBSD: cipher-3des1.c,v 1.1.1.1 2005/02/13 00:52:56 christos Exp $ */
/* $NetBSD: cipher-3des1.c,v 1.1.1.2 2006/09/28 21:15:05 christos Exp $ */
/* $OpenBSD: cipher-3des1.c,v 1.6 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2003 Markus Friedl. All rights reserved.
*
@ -23,10 +24,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
RCSID("$OpenBSD: cipher-3des1.c,v 1.2 2003/12/22 20:29:55 markus Exp $");
#include <sys/types.h>
#include <openssl/evp.h>
#include <string.h>
#include "xmalloc.h"
#include "log.h"

View File

@ -1,4 +1,5 @@
/* $NetBSD: cipher-bf1.c,v 1.1.1.1 2005/02/13 00:52:56 christos Exp $ */
/* $NetBSD: cipher-bf1.c,v 1.1.1.2 2006/09/28 21:15:05 christos Exp $ */
/* $OpenBSD: cipher-bf1.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2003 Markus Friedl. All rights reserved.
*
@ -23,10 +24,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
RCSID("$OpenBSD: cipher-bf1.c,v 1.1 2003/05/15 03:08:29 markus Exp $");
#include <sys/types.h>
#include <openssl/evp.h>
#include <string.h>
#include "xmalloc.h"
#include "log.h"
/*

View File

@ -1,5 +1,5 @@
/* $NetBSD: cipher.h,v 1.1.1.9 2005/02/13 00:52:57 christos Exp $ */
/* $OpenBSD: cipher.h,v 1.35 2004/07/28 09:40:29 markus Exp $ */
/* $NetBSD: cipher.h,v 1.1.1.10 2006/09/28 21:15:05 christos Exp $ */
/* $OpenBSD: cipher.h,v 1.36 2006/03/25 22:22:42 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>

View File

@ -1,4 +1,5 @@
/* $NetBSD: cleanup.c,v 1.1.1.1 2005/02/13 00:52:57 christos Exp $ */
/* $NetBSD: cleanup.c,v 1.1.1.2 2006/09/28 21:15:05 christos Exp $ */
/* $OpenBSD: cleanup.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
*
@ -14,8 +15,11 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "includes.h"
RCSID("$OpenBSD: cleanup.c,v 1.1 2003/09/23 20:17:11 markus Exp $");
#include <sys/types.h>
#include <unistd.h>
#include <stdarg.h>
#include "log.h"

View File

@ -1,5 +1,5 @@
/* $NetBSD: compress.h,v 1.1.1.6 2002/03/08 01:20:43 itojun Exp $ */
/* $OpenBSD: compress.h,v 1.11 2002/03/04 17:27:39 stevesk Exp $ */
/* $NetBSD: compress.h,v 1.1.1.7 2006/09/28 21:15:07 christos Exp $ */
/* $OpenBSD: compress.h,v 1.12 2006/03/25 22:22:43 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>

View File

@ -1,5 +1,5 @@
/* $NetBSD: crc32.c,v 1.1.1.5 2003/04/03 05:57:20 itojun Exp $ */
/* $OpenBSD: crc32.c,v 1.9 2003/02/12 21:39:50 markus Exp $ */
/* $NetBSD: crc32.c,v 1.1.1.6 2006/09/28 21:15:07 christos Exp $ */
/* $OpenBSD: crc32.c,v 1.11 2006/04/22 18:29:33 stevesk Exp $ */
/*
* Copyright (c) 2003 Markus Friedl. All rights reserved.
@ -101,7 +101,7 @@ ssh_crc32(const u_char *buf, u_int32_t size)
u_int32_t i, crc;
crc = 0;
for (i = 0; i < size; i++)
for (i = 0; i < size; i++)
crc = crc32tab[(crc ^ buf[i]) & 0xff] ^ (crc >> 8);
return crc;
}

View File

@ -1,5 +1,5 @@
/* $NetBSD: crc32.h,v 1.1.1.8 2003/04/03 05:57:20 itojun Exp $ */
/* $OpenBSD: crc32.h,v 1.14 2003/02/12 21:39:50 markus Exp $ */
/* $NetBSD: crc32.h,v 1.1.1.9 2006/09/28 21:15:07 christos Exp $ */
/* $OpenBSD: crc32.h,v 1.15 2006/03/25 22:22:43 djm Exp $ */
/*
* Copyright (c) 2003 Markus Friedl. All rights reserved.

View File

@ -1,5 +1,5 @@
/* $NetBSD: dispatch.h,v 1.1.1.5 2002/03/08 01:20:44 itojun Exp $ */
/* $OpenBSD: dispatch.h,v 1.9 2002/01/11 13:39:36 markus Exp $ */
/* $NetBSD: dispatch.h,v 1.1.1.6 2006/09/28 21:15:07 christos Exp $ */
/* $OpenBSD: dispatch.h,v 1.11 2006/04/20 09:27:09 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
@ -34,6 +34,6 @@ typedef void dispatch_fn(int, u_int32_t, void *);
void dispatch_init(dispatch_fn *);
void dispatch_set(int, dispatch_fn *);
void dispatch_range(u_int, u_int, dispatch_fn *);
void dispatch_run(int, int *, void *);
void dispatch_run(int, volatile sig_atomic_t *, void *);
void dispatch_protocol_error(int, u_int32_t, void *);
void dispatch_protocol_ignore(int, u_int32_t, void *);

View File

@ -1,5 +1,5 @@
/* $NetBSD: key.h,v 1.1.1.11 2005/02/13 00:53:01 christos Exp $ */
/* $OpenBSD: key.h,v 1.23 2003/11/10 16:23:41 jakob Exp $ */
/* $NetBSD: key.h,v 1.1.1.12 2006/09/28 21:15:10 christos Exp $ */
/* $OpenBSD: key.h,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.

View File

@ -1,5 +1,5 @@
/* $NetBSD: match.h,v 1.1.1.8 2002/03/08 01:20:47 itojun Exp $ */
/* $OpenBSD: match.h,v 1.12 2002/03/01 13:12:10 markus Exp $ */
/* $NetBSD: match.h,v 1.1.1.9 2006/09/28 21:15:10 christos Exp $ */
/* $OpenBSD: match.h,v 1.13 2006/03/25 22:22:43 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>

74
crypto/dist/ssh/md-sha256.c vendored Normal file
View File

@ -0,0 +1,74 @@
/* $NetBSD: md-sha256.c,v 1.1.1.1 2006/09/28 21:15:10 christos Exp $ */
/* $OpenBSD: md-sha256.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2005 Damien Miller <djm@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* EVP wrapper for SHA256 */
#include <sys/types.h>
#include <openssl/evp.h>
#include <sha2.h>
#include <string.h>
const EVP_MD *evp_ssh_sha256(void);
static int
ssh_sha256_init(EVP_MD_CTX *ctxt)
{
SHA256_Init(ctxt->md_data);
return (1);
}
static int
ssh_sha256_update(EVP_MD_CTX *ctxt, const void *data, unsigned long len)
{
SHA256_Update(ctxt->md_data, data, len);
return (1);
}
static int
ssh_sha256_final(EVP_MD_CTX *ctxt, unsigned char *digest)
{
SHA256_Final(digest, ctxt->md_data);
return (1);
}
static int
ssh_sha256_cleanup(EVP_MD_CTX *ctxt)
{
memset(ctxt->md_data, 0, sizeof(SHA256_CTX));
return (1);
}
const EVP_MD *
evp_ssh_sha256(void)
{
static EVP_MD ssh_sha256;
memset(&ssh_sha256, 0, sizeof(ssh_sha256));
ssh_sha256.type = NID_undef;
ssh_sha256.md_size = SHA256_DIGEST_LENGTH;
ssh_sha256.init = ssh_sha256_init;
ssh_sha256.update = ssh_sha256_update;
ssh_sha256.final = ssh_sha256_final;
ssh_sha256.cleanup = ssh_sha256_cleanup;
ssh_sha256.block_size = SHA256_BLOCK_LENGTH;
ssh_sha256.ctx_size = sizeof(SHA256_CTX);
return (&ssh_sha256);
}

View File

@ -1,5 +1,5 @@
/* $NetBSD: monitor_fdpass.h,v 1.1.1.1 2002/04/22 07:38:02 itojun Exp $ */
/* $OpenBSD: monitor_fdpass.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $ */
/* $NetBSD: monitor_fdpass.h,v 1.1.1.2 2006/09/28 21:15:12 christos Exp $ */
/* $OpenBSD: monitor_fdpass.h,v 1.3 2006/03/25 22:22:43 djm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>

View File

@ -1,5 +1,5 @@
/* $NetBSD: progressmeter.h,v 1.1.1.1 2003/04/03 05:57:27 itojun Exp $ */
/* $OpenBSD: progressmeter.h,v 1.1 2003/01/10 08:19:07 fgsch Exp $ */
/* $NetBSD: progressmeter.h,v 1.1.1.2 2006/09/28 21:15:15 christos Exp $ */
/* $OpenBSD: progressmeter.h,v 1.2 2006/03/25 22:22:43 djm Exp $ */
/*
* Copyright (c) 2002 Nils Nordman. All rights reserved.
*

View File

@ -1,5 +1,5 @@
/* $NetBSD: rsa.h,v 1.1.1.6 2002/03/08 01:20:59 itojun Exp $ */
/* $OpenBSD: rsa.h,v 1.15 2002/03/04 17:27:39 stevesk Exp $ */
/* $NetBSD: rsa.h,v 1.1.1.7 2006/09/28 21:15:16 christos Exp $ */
/* $OpenBSD: rsa.h,v 1.16 2006/03/25 22:22:43 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>

View File

@ -1,5 +1,5 @@
.\" $NetBSD: sftp-server.8,v 1.1.1.8 2005/02/13 00:53:14 christos Exp $
.\" $OpenBSD: sftp-server.8,v 1.10 2003/10/08 08:27:36 jmc Exp $
.\" $NetBSD: sftp-server.8,v 1.1.1.9 2006/09/28 21:15:21 christos Exp $
.\" $OpenBSD: sftp-server.8,v 1.11 2006/07/06 10:47:57 djm Exp $
.\"
.\" Copyright (c) 2000 Markus Friedl. All rights reserved.
.\"
@ -31,6 +31,8 @@
.Nd SFTP server subsystem
.Sh SYNOPSIS
.Nm sftp-server
.Op Fl f Ar log_facility
.Op Fl l Ar log_level
.Sh DESCRIPTION
.Nm
is a program that speaks the server side of SFTP protocol
@ -41,9 +43,36 @@ is not intended to be called directly, but from
using the
.Cm Subsystem
option.
.Pp
Command-line flags to
.Nm
should be specified in the
.Cm Subsystem
declaration.
See
.Xr sshd_config 5
for more information.
.Pp
Valid options are:
.Bl -tag -width Ds
.It Fl f Ar log_facility
Specifies the facility code that is used when logging messages from
.Nm .
The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
The default is AUTH.
.It Fl l Ar log_level
Specifies which messages will be logged by
.Nm .
The possible values are:
QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
INFO and VERBOSE log transactions that
.Nm
performs on behalf of the client.
DEBUG and DEBUG1 are equivalent.
DEBUG2 and DEBUG3 each specify higher levels of debugging output.
The default is ERROR.
.El
.Sh SEE ALSO
.Xr sftp 1 ,
.Xr ssh 1 ,

View File

@ -1,5 +1,5 @@
/* $NetBSD: ssh-gss.h,v 1.1.1.1 2005/02/13 00:53:16 christos Exp $ */
/* $OpenBSD: ssh-gss.h,v 1.5 2004/06/21 17:36:31 avsm Exp $ */
/* $NetBSD: ssh-gss.h,v 1.1.1.2 2006/09/28 21:15:24 christos Exp $ */
/* $OpenBSD: ssh-gss.h,v 1.9 2006/08/18 14:40:34 djm Exp $ */
/*
* Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
*
@ -29,8 +29,6 @@
#ifdef GSSAPI
#include "buffer.h"
#include <gssapi.h>
/* draft-ietf-secsh-gsskeyex-06 */
@ -101,6 +99,7 @@ void ssh_gssapi_delete_ctx(Gssctxt **);
OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t);
OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *);
int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *);
/* In the server */
int ssh_gssapi_userok(char *name);

View File

@ -1,5 +1,5 @@
/* $NetBSD: ssh2.h,v 1.1.1.6 2005/02/13 00:53:20 christos Exp $ */
/* $OpenBSD: ssh2.h,v 1.9 2003/05/14 00:52:59 markus Exp $ */
/* $NetBSD: ssh2.h,v 1.1.1.7 2006/09/28 21:15:28 christos Exp $ */
/* $OpenBSD: ssh2.h,v 1.10 2006/03/25 22:22:43 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.

View File

@ -1,5 +1,5 @@
/* $NetBSD: ttymodes.h,v 1.1.1.7 2005/02/13 00:53:26 christos Exp $ */
/* $OpenBSD: ttymodes.h,v 1.13 2004/07/11 17:48:47 deraadt Exp $ */
/* $NetBSD: ttymodes.h,v 1.1.1.8 2006/09/28 21:15:35 christos Exp $ */
/* $OpenBSD: ttymodes.h,v 1.14 2006/03/25 22:22:43 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>

View File

@ -1,5 +1,5 @@
/* $NetBSD: uidswap.h,v 1.1.1.4 2001/09/27 02:01:02 itojun Exp $ */
/* $OpenBSD: uidswap.h,v 1.9 2001/06/26 17:27:25 markus Exp $ */
/* $NetBSD: uidswap.h,v 1.1.1.5 2006/09/28 21:15:35 christos Exp $ */
/* $OpenBSD: uidswap.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@ -13,11 +13,7 @@
* called by a name other than "ssh" or "Secure Shell".
*/
#ifndef UIDSWAP_H
#define UIDSWAP_H
void temporarily_use_uid(struct passwd *);
void restore_uid(void);
void permanently_set_uid(struct passwd *);
#endif /* UIDSWAP_H */
void permanently_drop_suid(uid_t);

View File

@ -1,5 +1,5 @@
/* $NetBSD: uuencode.h,v 1.1.1.7 2005/02/13 00:53:26 christos Exp $ */
/* $OpenBSD: uuencode.h,v 1.10 2003/11/10 16:23:41 jakob Exp $ */
/* $NetBSD: uuencode.h,v 1.1.1.8 2006/09/28 21:15:00 christos Exp $ */
/* $OpenBSD: uuencode.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
@ -25,9 +25,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef UUENCODE_H
#define UUENCODE_H
int uuencode(const u_char *, u_int, char *, size_t);
int uudecode(const char *, u_char *, size_t);
void dump_base64(FILE *, u_char *, u_int);
#endif

View File

@ -1,5 +1,5 @@
/* $NetBSD: xmalloc.h,v 1.1.1.6 2002/06/24 05:26:09 itojun Exp $ */
/* $OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $ */
/* $NetBSD: xmalloc.h,v 1.1.1.7 2006/09/28 21:15:35 christos Exp $ */
/* $OpenBSD: xmalloc.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@ -17,12 +17,11 @@
* called by a name other than "ssh" or "Secure Shell".
*/
#ifndef XMALLOC_H
#define XMALLOC_H
void *xmalloc(size_t);
void *xrealloc(void *, size_t);
void *xcalloc(size_t, size_t);
void *xrealloc(void *, size_t, size_t);
void xfree(void *);
char *xstrdup(const char *);
#endif /* XMALLOC_H */
int xasprintf(char **, const char *, ...)
__attribute__((__format__ (printf, 2, 3)))
__attribute__((__nonnull__ (2)));