Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ssh OpenSSH 2.5.4 as of 2001/04/10



details:   https://anonhg.NetBSD.org/src/rev/0e710c34894a
branches:  trunk
changeset: 508354:0e710c34894a
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Apr 10 07:13:48 2001 +0000

description:
OpenSSH 2.5.4 as of 2001/04/10

diffstat:

 crypto/dist/ssh/auth-options.c |    1 +
 crypto/dist/ssh/auth-options.h |    1 +
 crypto/dist/ssh/auth-rh-rsa.c  |    5 +-
 crypto/dist/ssh/auth-rsa.c     |    5 +-
 crypto/dist/ssh/authfd.h       |    1 +
 crypto/dist/ssh/authfile.h     |   46 +---
 crypto/dist/ssh/bufaux.c       |    1 +
 crypto/dist/ssh/bufaux.h       |    1 +
 crypto/dist/ssh/buffer.c       |    8 +-
 crypto/dist/ssh/buffer.h       |    1 +
 crypto/dist/ssh/canohost.h     |    5 +-
 crypto/dist/ssh/channels.h     |    9 +-
 crypto/dist/ssh/cipher.h       |    1 +
 crypto/dist/ssh/clientloop.h   |    1 +
 crypto/dist/ssh/compat.c       |   63 +++++-
 crypto/dist/ssh/compat.h       |    8 +-
 crypto/dist/ssh/compress.h     |    6 +-
 crypto/dist/ssh/crc32.c        |    1 +
 crypto/dist/ssh/crc32.h        |    1 +
 crypto/dist/ssh/deattack.h     |    1 +
 crypto/dist/ssh/dh.h           |   16 +-
 crypto/dist/ssh/dispatch.c     |    1 +
 crypto/dist/ssh/dispatch.h     |    1 +
 crypto/dist/ssh/getput.h       |    1 +
 crypto/dist/ssh/groupaccess.c  |    1 +
 crypto/dist/ssh/groupaccess.h  |    1 +
 crypto/dist/ssh/kex.h          |  109 +++++-----
 crypto/dist/ssh/kexdh.c        |  305 ++++++++++++++++++++++++++++++
 crypto/dist/ssh/kexgex.c       |  409 +++++++++++++++++++++++++++++++++++++++++
 crypto/dist/ssh/key.h          |    1 +
 crypto/dist/ssh/log.c          |    1 +
 crypto/dist/ssh/log.h          |    1 +
 crypto/dist/ssh/mac.c          |    5 +-
 crypto/dist/ssh/mac.h          |    1 +
 crypto/dist/ssh/match.c        |    1 +
 crypto/dist/ssh/match.h        |    1 +
 crypto/dist/ssh/mpaux.h        |    1 +
 crypto/dist/ssh/myproposal.h   |    1 +
 crypto/dist/ssh/nchan.c        |    1 +
 crypto/dist/ssh/nchan.h        |    1 +
 crypto/dist/ssh/packet.h       |    1 +
 crypto/dist/ssh/radix.h        |    1 +
 crypto/dist/ssh/readpass.h     |    1 +
 crypto/dist/ssh/rijndael.c     |    1 +
 crypto/dist/ssh/rsa.c          |   23 ++-
 crypto/dist/ssh/rsa.h          |    5 +-
 crypto/dist/ssh/scp.1          |    1 +
 crypto/dist/ssh/serverloop.h   |    1 +
 crypto/dist/ssh/session.h      |    8 +-
 crypto/dist/ssh/sftp-common.c  |    1 +
 crypto/dist/ssh/sftp-common.h  |    1 +
 crypto/dist/ssh/sftp-glob.h    |    5 +-
 crypto/dist/ssh/sftp-int.h     |    1 +
 crypto/dist/ssh/sftp-server.8  |    1 +
 crypto/dist/ssh/ssh-dss.h      |    1 +
 crypto/dist/ssh/ssh-rsa.h      |    1 +
 crypto/dist/ssh/ssh2.h         |    6 +-
 crypto/dist/ssh/sshconnect.h   |   11 +-
 crypto/dist/ssh/sshlogin.c     |   13 +-
 crypto/dist/ssh/sshlogin.h     |    1 +
 crypto/dist/ssh/sshpty.c       |    1 +
 crypto/dist/ssh/sshpty.h       |    1 +
 crypto/dist/ssh/tildexpand.h   |    1 +
 crypto/dist/ssh/ttymodes.c     |    1 +
 crypto/dist/ssh/ttymodes.h     |    1 +
 crypto/dist/ssh/uidswap.c      |   92 ++++++---
 crypto/dist/ssh/uidswap.h      |    7 +-
 crypto/dist/ssh/uuencode.h     |    1 +
 crypto/dist/ssh/xmalloc.h      |    1 +
 69 files changed, 1041 insertions(+), 174 deletions(-)

diffs (truncated from 2060 to 300 lines):

diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/auth-options.c
--- a/crypto/dist/ssh/auth-options.c    Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/auth-options.c    Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: auth-options.c,v 1.1.1.6 2001/04/10 07:13:48 itojun Exp $      */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/auth-options.h
--- a/crypto/dist/ssh/auth-options.h    Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/auth-options.h    Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: auth-options.h,v 1.1.1.4 2001/04/10 07:13:48 itojun Exp $      */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/auth-rh-rsa.c
--- a/crypto/dist/ssh/auth-rh-rsa.c     Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/auth-rh-rsa.c     Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: auth-rh-rsa.c,v 1.1.1.4 2001/04/10 07:13:48 itojun Exp $       */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -13,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-rh-rsa.c,v 1.22 2001/02/03 10:08:36 markus Exp $");
+RCSID("$OpenBSD: auth-rh-rsa.c,v 1.23 2001/04/06 21:00:04 markus Exp $");
 
 #include "packet.h"
 #include "xmalloc.h"
@@ -80,7 +81,7 @@
                            pw->pw_name, user_hostfile);
                } else {
                        /* XXX race between stat and the following open() */
-                       temporarily_use_uid(pw->pw_uid);
+                       temporarily_use_uid(pw);
                        host_status = check_host_in_hostfile(user_hostfile, canonical_hostname,
                            client_key, found, NULL);
                        restore_uid();
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/auth-rsa.c
--- a/crypto/dist/ssh/auth-rsa.c        Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/auth-rsa.c        Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: auth-rsa.c,v 1.1.1.5 2001/04/10 07:13:49 itojun Exp $  */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -14,7 +15,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.39 2001/03/01 02:45:10 deraadt Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.40 2001/04/06 21:00:07 markus Exp $");
 
 #include <openssl/rsa.h>
 #include <openssl/md5.h>
@@ -135,7 +136,7 @@
                return 0;
 
        /* Temporarily use the user's uid. */
-       temporarily_use_uid(pw->pw_uid);
+       temporarily_use_uid(pw);
 
        /* The authorized keys. */
        snprintf(file, sizeof file, "%.500s/%.100s", pw->pw_dir,
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/authfd.h
--- a/crypto/dist/ssh/authfd.h  Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/authfd.h  Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: authfd.h,v 1.1.1.4 2001/04/10 07:13:50 itojun Exp $    */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/authfile.h
--- a/crypto/dist/ssh/authfile.h        Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/authfile.h        Tue Apr 10 07:13:48 2001 +0000
@@ -1,8 +1,8 @@
+/*     $NetBSD: authfile.h,v 1.1.1.4 2001/04/10 07:13:51 itojun Exp $  */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
  *                    All rights reserved
- * Functions to interface with the SSH_AUTHENTICATION_FD socket.
  *
  * 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
@@ -11,41 +11,27 @@
  * called by a name other than "ssh" or "Secure Shell".
  */
 
-/* $OpenBSD: authfile.h,v 1.5 2000/10/16 09:38:44 djm Exp $ */
+/* $OpenBSD: authfile.h,v 1.6 2001/03/26 08:07:08 markus Exp $ */
 
 #ifndef AUTHFILE_H
 #define AUTHFILE_H
 
+int
+key_save_private(Key *key, const char *filename, const char *passphrase,
+    const char *comment);
 
-/*
- * Saves the authentication (private) key in a file, encrypting it with
- * passphrase.
- * For RSA keys: The identification of the file (lowest 64 bits of n)
- * will precede the key to provide identification of the key without
- * needing a passphrase.
- */
-int
-save_private_key(const char *filename, const char *passphrase,
-    Key * private_key, const char *comment);
+Key *
+key_load_public(const char *filename, char **commentp);
 
-/*
- * Loads the public part of the key file (public key and comment). Returns 0
- * if an error occurred; zero if the public key was successfully read.  The
- * comment of the key is returned in comment_return if it is non-NULL; the
- * caller must free the value with xfree.
- */
-int load_public_key(const char *filename, Key * pub, char **comment_return);
-int try_load_public_key(const char *filename, Key * pub, char **comment_return);
+Key *
+key_load_public_type(int type, const char *filename, char **commentp);
 
-/*
- * Loads the private key from the file.  Returns 0 if an error is encountered
- * (file does not exist or is not readable, or passphrase is bad). This
- * initializes the private key.  The comment of the key is returned in
- * comment_return if it is non-NULL; the caller must free the value with
- * xfree.
- */
-int
-load_private_key(const char *filename, const char *passphrase,
-    Key * private_key, char **comment_return);
+Key *
+key_load_private(const char *filename, const char *passphrase,
+    char **commentp);
+
+Key *
+key_load_private_type(int type, const char *filename, const char *passphrase,
+    char **commentp);
 
 #endif
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/bufaux.c
--- a/crypto/dist/ssh/bufaux.c  Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/bufaux.c  Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: bufaux.c,v 1.1.1.4 2001/04/10 07:13:51 itojun Exp $    */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/bufaux.h
--- a/crypto/dist/ssh/bufaux.h  Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/bufaux.h  Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: bufaux.h,v 1.1.1.4 2001/04/10 07:13:51 itojun Exp $    */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/buffer.c
--- a/crypto/dist/ssh/buffer.c  Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/buffer.c  Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: buffer.c,v 1.1.1.4 2001/04/10 07:13:51 itojun Exp $    */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -12,7 +13,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: buffer.c,v 1.10 2001/01/21 19:05:45 markus Exp $");
+RCSID("$OpenBSD: buffer.c,v 1.12 2001/04/07 08:55:15 markus Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
@@ -112,7 +113,8 @@
 buffer_get(Buffer *buffer, char *buf, u_int len)
 {
        if (len > buffer->end - buffer->offset)
-               fatal("buffer_get: trying to get more bytes than in buffer");
+               fatal("buffer_get: trying to get more bytes %d than in buffer %d",
+                   len, buffer->end - buffer->offset);
        memcpy(buf, buffer->buf + buffer->offset, len);
        buffer->offset += len;
 }
@@ -155,5 +157,5 @@
 
        for (i = buffer->offset; i < buffer->end; i++)
                fprintf(stderr, " %02x", ucp[i]);
-       fprintf(stderr, "\n");
+       fprintf(stderr, "\r\n");
 }
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/buffer.h
--- a/crypto/dist/ssh/buffer.h  Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/buffer.h  Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: buffer.h,v 1.1.1.4 2001/04/10 07:13:51 itojun Exp $    */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/canohost.h
--- a/crypto/dist/ssh/canohost.h        Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/canohost.h        Tue Apr 10 07:13:48 2001 +0000
@@ -1,4 +1,5 @@
-/*     $OpenBSD: canohost.h,v 1.4 2001/02/03 10:08:37 markus Exp $     */
+/*     $NetBSD: canohost.h,v 1.1.1.2 2001/04/10 07:13:51 itojun Exp $  */
+/*     $OpenBSD: canohost.h,v 1.5 2001/04/05 15:48:19 stevesk Exp $    */
 
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
@@ -25,6 +26,8 @@
  */
 const char *get_remote_ipaddr(void);
 
+const char *get_remote_name_or_ip(u_int utmp_len, int reverse_mapping_check);
+
 /* Returns the ipaddr/port number of the peer of the socket. */
 char * get_peer_ipaddr(int socket);
 int     get_peer_port(int sock);
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/channels.h
--- a/crypto/dist/ssh/channels.h        Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/channels.h        Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: channels.h,v 1.1.1.6 2001/04/10 07:13:53 itojun Exp $  */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -32,7 +33,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* RCSID("$OpenBSD: channels.h,v 1.28 2001/03/16 19:06:29 markus Exp $"); */
+/* RCSID("$OpenBSD: channels.h,v 1.30 2001/04/07 08:55:17 markus Exp $"); */
 
 #ifndef CHANNELS_H
 #define CHANNELS_H
@@ -53,7 +54,8 @@
 #define SSH_CHANNEL_LARVAL             10      /* larval session */
 #define SSH_CHANNEL_RPORT_LISTENER     11      /* Listening to a R-style port  */
 #define SSH_CHANNEL_CONNECTING         12
-#define SSH_CHANNEL_MAX_TYPE           13
+#define SSH_CHANNEL_DYNAMIC            13
+#define SSH_CHANNEL_MAX_TYPE           14
 
 /*
  * Data structure for channel data.  This is iniailized in channel_allocate
@@ -171,7 +173,8 @@
  * select bitmasks.
  */
 void
-channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp);
+channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
+    int rekeying);
 
 /*
  * After select, perform any appropriate operations for channels which have
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/cipher.h
--- a/crypto/dist/ssh/cipher.h  Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/cipher.h  Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: cipher.h,v 1.1.1.4 2001/04/10 07:13:53 itojun Exp $    */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/clientloop.h
--- a/crypto/dist/ssh/clientloop.h      Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/clientloop.h      Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: clientloop.h,v 1.1.1.2 2001/04/10 07:13:54 itojun Exp $        */
 /*     $OpenBSD: clientloop.h,v 1.4 2001/02/06 22:43:02 markus Exp $   */
 
 /*
diff -r 6de7f3936ce5 -r 0e710c34894a crypto/dist/ssh/compat.c
--- a/crypto/dist/ssh/compat.c  Tue Apr 10 07:03:49 2001 +0000
+++ b/crypto/dist/ssh/compat.c  Tue Apr 10 07:13:48 2001 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: compat.c,v 1.1.1.6 2001/04/10 07:13:54 itojun Exp $    */
 /*
  * Copyright (c) 1999,2000 Markus Friedl.  All rights reserved.
  *
@@ -23,7 +24,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: compat.c,v 1.39 2001/03/18 23:30:55 deraadt Exp $");
+RCSID("$OpenBSD: compat.c,v 1.45 2001/04/05 11:09:16 markus Exp $");
 
 #include <regex.h>
 
@@ -60,29 +61,45 @@
                int     bugs;
        } check[] = {
                { "^OpenSSH[-_]2\\.[012]",
-                                       SSH_OLD_SESSIONID|SSH_BUG_BANNER },
-               { "^OpenSSH_2\\.3\\.0", SSH_BUG_BANNER },
+                                       SSH_OLD_SESSIONID|SSH_BUG_BANNER|



Home | Main Index | Thread Index | Old Index