summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-30 05:19:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-30 05:19:58 +0000
commitc167d8a3fabef2289593ea48c8ffc69a46a5f18d (patch)
tree6517694edb0e7bb5749d8acd4ba256c1ea0a336a /usr.bin
parent7842c7f5dbdb242d9ec9b6f213d8b39a73c8f8ce (diff)
cull, cull, cull
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/cipher.c6
-rw-r--r--usr.bin/ssh/includes.h72
-rw-r--r--usr.bin/ssh/pty.c19
-rw-r--r--usr.bin/ssh/ssh_md5.c10
-rw-r--r--usr.bin/ssh/ssh_md5.h8
5 files changed, 26 insertions, 89 deletions
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c
index 72be90a4068..8a352a8d1be 100644
--- a/usr.bin/ssh/cipher.c
+++ b/usr.bin/ssh/cipher.c
@@ -12,7 +12,7 @@ Created: Wed Apr 19 17:41:39 1995 ylo
*/
#include "includes.h"
-RCSID("$Id: cipher.c,v 1.4 1999/09/28 04:45:36 provos Exp $");
+RCSID("$Id: cipher.c,v 1.5 1999/09/30 05:19:57 deraadt Exp $");
#include "ssh.h"
#include "cipher.h"
@@ -80,9 +80,9 @@ static
void
swap_bytes(const unsigned char *src, unsigned char *dst_, int n)
{
- uint32 *dst = (uint32 *)dst_; /* dst must be properly aligned. */
+ u_int32_t *dst = (u_int32_t *)dst_; /* dst must be properly aligned. */
union {
- uint32 i;
+ u_int32_t i;
char c[4];
} t;
diff --git a/usr.bin/ssh/includes.h b/usr.bin/ssh/includes.h
index 7ac4bed1934..d09fcf763e6 100644
--- a/usr.bin/ssh/includes.h
+++ b/usr.bin/ssh/includes.h
@@ -13,7 +13,7 @@ This file includes most of the needed system headers.
*/
-/* RCSID("$Id: includes.h,v 1.5 1999/09/30 05:03:04 deraadt Exp $"); */
+/* RCSID("$Id: includes.h,v 1.6 1999/09/30 05:19:57 deraadt Exp $"); */
#ifndef INCLUDES_H
#define INCLUDES_H
@@ -21,91 +21,47 @@ This file includes most of the needed system headers.
/* Note: autoconf documentation tells to use the <...> syntax and have -I. */
#include <config.h>
-#include "version.h"
-
-typedef unsigned short word16;
-
-#if SIZEOF_LONG == 4
-typedef unsigned long word32;
-#else
-#if SIZEOF_INT == 4
-typedef unsigned int word32;
-#else
-#if SIZEOF_SHORT >= 4
-typedef unsigned short word32;
-#else
-YOU_LOSE
-#endif
-#endif
-#endif
-
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/select.h>
#include <sys/param.h>
-#include <machine/endian.h>
-#include <netgroup.h>
+#include <sys/ioctl.h>
+#include <sys/endian.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/un.h>
+#include <sys/resource.h>
+#include <netgroup.h>
#include <stdio.h>
#include <ctype.h>
-#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <assert.h>
#include <signal.h>
-#include <sys/ioctl.h>
-
#include <termios.h>
-
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
-#include <sys/un.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
-#include <sys/select.h>
#include <pwd.h>
#include <grp.h>
-
-#include <sys/wait.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#include <sys/time.h>
#include <time.h>
-
#include <paths.h>
-#if HAVE_DIRENT_H
#include <dirent.h>
-#define NAMLEN(dirent) strlen((dirent)->d_name)
-#else
-#define dirent direct
-#define NAMLEN(dirent) (dirent)->d_namlen
-#if HAVE_SYS_NDIR_H
-#include <sys/ndir.h>
-#endif
-#if HAVE_SYS_DIR_H
-#include <sys/dir.h>
-#endif
-#if HAVE_NDIR_H
-#include <ndir.h>
-#endif
-#endif
-#include <sys/resource.h>
-
-#if USE_STRLEN_FOR_AF_UNIX
-#define AF_UNIX_SIZE(unaddr) \
- (sizeof((unaddr).sun_family) + strlen((unaddr).sun_path) + 1)
-#else
#define AF_UNIX_SIZE(unaddr) sizeof(unaddr)
-#endif
+
+#include "version.h"
#endif /* INCLUDES_H */
diff --git a/usr.bin/ssh/pty.c b/usr.bin/ssh/pty.c
index b985eb1b3d6..d9b7968077c 100644
--- a/usr.bin/ssh/pty.c
+++ b/usr.bin/ssh/pty.c
@@ -14,7 +14,7 @@ Allocating a pseudo-terminal, and making it the controlling tty.
*/
#include "includes.h"
-RCSID("$Id: pty.c,v 1.3 1999/09/30 05:03:05 deraadt Exp $");
+RCSID("$Id: pty.c,v 1.4 1999/09/30 05:19:57 deraadt Exp $");
#include "pty.h"
#include "ssh.h"
@@ -24,12 +24,6 @@ RCSID("$Id: pty.c,v 1.3 1999/09/30 05:03:05 deraadt Exp $");
#undef HAVE_DEV_PTMX
#endif
-#ifdef HAVE_DEV_PTMX
-#include <sys/stream.h>
-#include <stropts.h>
-#include <sys/conf.h>
-#endif /* HAVE_DEV_PTMX */
-
#ifndef O_NOCTTY
#define O_NOCTTY 0
#endif
@@ -252,17 +246,6 @@ void pty_make_controlling_tty(int *ttyfd, const char *ttyname)
else
{
close(fd);
-#ifdef HAVE_VHANGUP
- signal(SIGHUP, SIG_IGN);
- vhangup();
- signal(SIGHUP, SIG_DFL);
- fd = open(ttyname, O_RDWR);
- if (fd == -1)
- error("pty_make_controlling_tty: reopening controlling tty after vhangup failed for %.100s",
- ttyname);
- close(*ttyfd);
- *ttyfd = fd;
-#endif /* HAVE_VHANGUP */
}
}
diff --git a/usr.bin/ssh/ssh_md5.c b/usr.bin/ssh/ssh_md5.c
index e0b370e26d3..e1659dc3335 100644
--- a/usr.bin/ssh/ssh_md5.c
+++ b/usr.bin/ssh/ssh_md5.c
@@ -43,12 +43,12 @@ void MD5Init(struct MD5Context *ctx)
*/
void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
{
- uint32 t;
+ u_int32_t t;
/* Update bitcount */
t = ctx->bits[0];
- if ((ctx->bits[0] = (t + ((uint32)len << 3)) & 0xffffffff) < t)
+ if ((ctx->bits[0] = (t + ((u_int32_t)len << 3)) & 0xffffffff) < t)
ctx->bits[1]++; /* Carry from low to high */
ctx->bits[1] += len >> 29;
@@ -147,10 +147,10 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
* reflect the addition of 16 longwords of new data. MD5Update blocks
* the data and converts bytes into longwords for this routine.
*/
-void MD5Transform(uint32 buf[4], const unsigned char inext[64])
+void MD5Transform(u_int32_t buf[4], const unsigned char inext[64])
{
- register word32 a, b, c, d, i;
- word32 in[16];
+ register u_int32_t a, b, c, d, i;
+ u_int32_t in[16];
for (i = 0; i < 16; i++)
in[i] = GET_32BIT_LSB_FIRST(inext + 4 * i);
diff --git a/usr.bin/ssh/ssh_md5.h b/usr.bin/ssh/ssh_md5.h
index e7380ce740b..f0933e993e7 100644
--- a/usr.bin/ssh/ssh_md5.h
+++ b/usr.bin/ssh/ssh_md5.h
@@ -1,11 +1,9 @@
#ifndef MD5_H
#define MD5_H
-typedef word32 uint32;
-
struct MD5Context {
- uint32 buf[4];
- uint32 bits[2];
+ u_int32_t buf[4];
+ u_int32_t bits[2];
unsigned char in[64];
};
@@ -17,6 +15,6 @@ void MD5Update(struct MD5Context *context, unsigned char const *buf,
#define MD5Final ssh_MD5Final
void MD5Final(unsigned char digest[16], struct MD5Context *context);
#define MD5Transform ssh_MD5Transform
-void MD5Transform(uint32 buf[4], const unsigned char in[64]);
+void MD5Transform(u_int32_t buf[4], const unsigned char in[64]);
#endif /* !MD5_H */