Commit 85c8bcbe authored by Niels Möller's avatar Niels Möller

*** empty log message ***

Rev: Makefile.am.in:1.3
Rev: configure.in:1.2
Rev: doc/Makefile.am.in:1.4
Rev: doc/example.1:1.1
Rev: src/Makefile.am.in:1.29
Rev: src/io.c:1.45
Rev: src/keyexchange.c:1.41
Rev: src/reaper.c:1.8
Rev: src/ssh1_fallback.c:1.1
Rev: src/ssh1_fallback.h:1.1
Rev: src/symmetric/Makefile.am.in:1.11
Rev: src/symmetric/include/Makefile.am.in:1.5
Rev: src/zlib.c:1.11
parent 2d7853cf
......@@ -5,11 +5,28 @@ BODY:
AUTOMAKE_OPTIONS = foreign
# We must run make the .dist_classes and various .dist_headers after
# recompiling, but before making a dist, as they uses dependency information to
# figure out which header files should be included in the dist.
DOTDISTS = src/.dist_classes src/.dist_headers \
src/symmetric/.dist_headers src/symmetric/include/.dist_headers
MAKEFILESAM = Makefile.am doc/Makefile.am src/Makefile.am \
src/symmetric/Makefile.am src/symmetric/include/MAkefile.am
# FIXME: Use the BASH variable to execute the script. The problem is
# that the script attempts to start itselt with "$0 args".
$(MAKEFILESAM): $(addsuffix .in,$(MAKEFILESAM))
./make_am --rethink
$(DOTDISTS): depend
./make_am --rethink
# FIXME: Have to figure out how to create dependency files recursively.
# dist-hook: $(DOTDISTS)
Makefile.am: Makefile.am.in
./make_am
MAINTAINERCLEANFILES += $(DOTDISTS) $(MAKEFILESAM)
# Is this rule needed?
all-recursive check-recursive: config.h
......
......@@ -67,8 +67,10 @@ AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AM_PROG_CC_STDC
AC_CHECK_PROG(SCHEME, scsh,, scsh)
AC_CHECK_PROG(BASH, bash,, bash)
AC_PATH_PROG(SCHEME, scsh,, /usr/local/bin/scsh)
AC_PATH_PROG(BASH, bash,, /bin/bash)
AC_PATH_PROG(GROFF, groff,, /usr/bin/groff)
if test x$am_cv_prog_cc_stdc = xno ; then
AC_ERROR([the C compiler doesn't handle ANSI-C])
......
## Process this file with make_am to produce Makefile.am
BODY:
EXTRA_DIST = HACKING NOTES TASKLIST configuration.txt \
EXTRA_DIST = HACKING NOTES PORTS TASKLIST configuration.txt \
Makefile.am.in
Makefile.am: Makefile.am.in
(cd $(top_srcdir); ./make_am)
# FIXME: Make this less GNU-make specific
MANPAGES = $(wildcard *.[1-9])
DVIS = $(addsuffix .dvi, $(MANPAGES))
PSS = $(addsuffix .ps, $(MANPAGES))
# all: dvi ps
dvi: $(DVIS)
ps: $(PSS)
%.dvi: %
$(GROFF) -Tdvi -mandoc $< > $@
%.ps: %
$(GROFF) -Tps -mandoc $< > $@
DISTCLEANFILES = $(DVIS) $(PSS)
.\" COPYRIGHT AND PERMISSION NOTICE
.\"
.\" Copyright (C) 1999 J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Permission is granted to copy and distribute translations of this manual
.\" into another language, under the above conditions for modified versions,
.\" except that this permission notice may be stated in a translation approved
.\" by the Free Software Foundation, Inc. <URL:http://www.fsf.org>
.\"
.\" END COPYRIGHT AND PERMISSION NOTICE
.\"
.\" If you make modified versions of this manual, please notify the current
.\" maintainers of the package you received this manual from and make your
.\" modified versions available to them.
.\"
.TH FOO 1 "JANUARY 1999" LSH "Lsh Manuals"
.SH NAME
foo \- frobnicate the bar library
.SH DISCLAIMER
LSH IS WORK IN PROGRESS. DON'T EXPECT THE CURRENT VERSION TO WORK, AND
.B "*DON'T*"
EXPECT IT TO PROVIDE ANY SECURITY WHATSOEVER.
.SH SYNOPSIS
.B foo [-bar] [-c
.I config-file
.B ]
.I file
.B ...
.SH DESCRIPTION
.B foo
frobnicates the bar library by tweaking internal
symbol tables. By default it parses all baz segments
and rearranges them in reverse order by time for the
.BR xyzzy (1)
linker to find them. The symdef entry is then compressed
using the WBG (Whiz-Bang-Gizmo) algorithm.
All files are processed in the order specified.
.SH OPTIONS
.IP -b
Do not write `busy' to stdout while processing.
.IP "-c config-file"
Use the alternate system wide
.I config-file
instead of
.IR /etc/foo.conf .
This overrides any
.B FOOCONF
environment variable.
.IP -a
In addition to the baz segments, also parse the
blurfl headers.
.IP -r
Recursive mode. Operates as fast as lightning
at the expense of a megabyte of virtual memory.
.SH FILES
.I /etc/foo.conf
.RS
The system wide configuration file. See
.BR foo (5)
for further details.
.RE
.I ~/.foorc
.RS
Per user configuration file. See
.BR foo (5)
for further details.
.SH ENVIRONMENT
.IP FOOCONF
If non-null the full pathname for an alternate system wide
.IR foo.conf .
Overridden by the
.B -c
option.
.SH DIAGNOSTICS
The following diagnostics may be issued on stderr:
Bad magic number.
.RS
The input file does not look like an archive file.
.RE
Old style baz segments.
.RS
.B foo
can only handle new style baz segments. COBOL
object libraries are not supported in this version.
.SH BUGS
The command name should have been chosen more carefully
to reflect its purpose.
.SH COPYING
The lsh suite of programs is distributed under the GNU General Public
License; see the COPYING and AUTHORS files in the source distribution for
details.
.SH AUTHOR
This man-page was written by J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl>.
.SH "SEE ALSO"
.BR bar (1),
.BR foo (5),
.BR xyzzy (1)
......@@ -25,6 +25,7 @@ Makefile.am: Makefile.am.in
bin_PROGRAMS = lsh lshd lsh_keygen lsh_writekey
noinst_PROGRAMS = prime_table digit_table sexp_test
noinst_LIBRARIES = liblsh.a
# noinst_HEADERS = $(dist_x_files) $(cvs_headers)
# Don't use BUILT_SOURCES, as all these files are #included, and can't be
# compiled or dependency checked independently.
......@@ -42,7 +43,7 @@ liblsh_a_SOURCES = abstract_io.c abstract_crypto.c abstract_compress.c \
randomness.c \
read_scan.c read_data.c read_line.c read_packet.c resource.c \
sexp.c sexp_parser.c sexp_streamed_parser.c \
sha.c service.c \
sha.c service.c ssh1_fallback.c \
translate_signal.c unpad.c userauth.c \
werror.c write_buffer.c xalloc.c zlib.c
......@@ -148,7 +149,9 @@ ctags: ctags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) $(TAGS_DEPENDENCIE
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$(CONFIG_HEADER)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && ctags -o $$here/tags $(CTAGS_ARGS) $$tags $(CONFIG_HEADER) $$unique $(LISP))
|| (cd $(srcdir) && ctags --langmap=c:.c.x -o $$here/tags $(CTAGS_ARGS) $$tags $(CONFIG_HEADER) $$unique $(LISP))
# This treats .h.x files as C files rather than headers, but we can't
# distinguish them from .c.x files with ctags.
# Override the standard distclean-tags target, as this doesn't support `tags'
distclean-tags:
......
......@@ -264,7 +264,7 @@ static void read_callback(struct lsh_fd *fd)
res = READ_HANDLER(self->handler,
&r.super);
/* NOTE: These flags are not mutually exclusive. All combination
/* NOTE: These flags are not mutually exclusive. All combinations
* must be handled correctly. */
/* NOTE: (i) If LSH_DIE is set, LSH_CLOSE is ignored. (ii) If the fd
......
......@@ -616,7 +616,7 @@ struct make_kexinit *make_simple_kexinit(struct randomness *r,
#if 0
/* FIXME: This function should be replaced by something more
* configurable. Perhaps greating the algorithm alist should be
* configurable. Perhaps creating the algorithm alist should be
* handled by the same function. */
struct make_kexinit *make_test_kexinit(struct randomness *r)
......
......@@ -151,7 +151,7 @@ struct reap *make_reaper(void)
return &closure->super;
}
/* FIXME: Prehaps this function should return a suitable exit code? */
/* FIXME: Perhaps this function should return a suitable exit code? */
void reaper_run(struct reap *r, struct io_backend *b)
{
CAST(reaper, self, r);
......
/* ssh1_fallback.h
*
* $Id$ */
/* lsh, an implementation of the ssh protocol
*
* Copyright (C) 1998 Niels Mller
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "ssh1_fallback.h"
#include "werror.h"
#include "xalloc.h"
#include <errno.h>
#include <string.h>
#include <unistd.h>
#define CLASS_DEFINE
#include "ssh1_fallback.h.x"
#undef CLASS_DEFINE
#include "ssh1_fallback.c.x"
/* CLASS:
(class
(name sshd1)
(super ssh1_fallback)
(vars
;; Why is the portnumber needed?
(port . "char *")
;; Full path to sshd1
(sshd1 . "char *")))
*/
static int fall_back_to_ssh1(struct ssh1_fallback *c,
int fd, UINT32 length, const UINT8 *line)
{
CAST(sshd1, closure, c);
/* We fork a SSH1 server to handle this connection. */
pid_t pid;
werror("lshd: Attempting falling back to ssh1 (experimental).\n");
pid = fork();
if (pid < 0)
{
werror("Forking to start fallback sshd1 failed with %s\n",
strerror(errno));
return LSH_FAIL | LSH_DIE;
}
else if (pid == 0)
{
/* Child process */
/* Create a NUL-terminated version string. */
char *version = alloca(length + 1);
memcpy(version, line, length);
version[length] = '\0';
/* NOTE: All fds should have the close-on-exec flag set.
* So all we have to do is to dup the socket fd to stdin
* and stdout. */
/* FIXME: not implemented yet. How do we know the socket fd? */
if (dup2(fd, STDIN_FILENO) < 0)
{
werror("lshd: fall_back_to_ssh1: Failed to dup socket to STDIN.\n");
_exit(EXIT_FAILURE);
}
if (dup2(fd, STDOUT_FILENO) < 0)
{
werror("lshd: fall_back_to_ssh1: Failed to dup socket to STDOUT.\n");
_exit(EXIT_FAILURE);
}
/* What should we do about stderr? We can probably not share it
* (that would be more difficult if we had put it into
* non-blocking mode, but we haven't). */
execl(closure->sshd1, closure->sshd1,
"-V" ,version, /* Compatibility mode */
"-d", /* Debug mode */
"-p", closure->port, /* Port number */
"-i", /* inetd mode */
NULL);
werror("lshd: fall_back_to_ssh1: execl failed (errno = %d): %s\n",
errno, strerror(errno));
_exit(EXIT_FAILURE);
}
else
{ /* pid > 0 */
/* Parent */
/* This tells the backend to close our socket. */
return LSH_OK | LSH_DIE;
}
}
struct ssh1_fallback *make_ssh1_fallback(char *port, char *sshd1)
{
NEW(sshd1, closure);
closure->super.fallback = fall_back_to_ssh1;
closure->port = port;
closure->sshd1 = sshd1;
return &closure->super;
}
/* ssh1_fallback.h
*
* $Id$ */
/* lsh, an implementation of the ssh protocol
*
* Copyright (C) 1998 Niels Mller
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef LSH_SSH1_FALLBACK_H_INCLUDED
#define LSH_SSH1_FALLBACK_H_INCLUDED
#include "lsh.h"
#define CLASS_DECLARE
#include "ssh1_fallback.h.x"
#undef CLASS_DECLARE
/* CLASS:
(class
(name ssh1_fallback)
(vars
(fallback method int "int fd" "UINT32 length" "const UINT8 *line")))
*/
#define SSH1_FALLBACK(f, fd, length, line) \
((f)->fallback((f), (fd), (length), (line)))
struct ssh1_fallback *make_ssh1_fallback(char *port, char *sshd1);
#endif /* LSH_SSH1_FALLBACK_H_INCLUDED */
......@@ -90,7 +90,9 @@ ctags: ctags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) $(TAGS_DEPENDENCIE
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$(CONFIG_HEADER)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && ctags -o $$here/tags $(CTAGS_ARGS) $$tags $(CONFIG_HEADER) $$unique $(LISP))
|| (cd $(srcdir) && ctags --langmap=c:.c.x -o $$here/tags $(CTAGS_ARGS) $$tags $(CONFIG_HEADER) $$unique $(LISP))
# This treats .h.x files as C files rather than headers, but we can't
# distinguish them from .c.x files with ctags.
# Override the standard distclean-tags target, as this doesn't support `tags'
distclean-tags:
......
......@@ -25,7 +25,9 @@ ctags: ctags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) $(TAGS_DEPENDENCIE
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$(CONFIG_HEADER)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && ctags -o $$here/tags $(CTAGS_ARGS) $$tags $(CONFIG_HEADER) $$unique $(LISP))
|| (cd $(srcdir) && ctags --langmap=c:.c.x -o $$here/tags $(CTAGS_ARGS) $$tags $(CONFIG_HEADER) $$unique $(LISP))
# This treats .h.x files as C files rather than headers, but we can't
# distinguish them from .c.x files with ctags.
# Override the standard distclean-tags target, as this doesn't support `tags'
distclean-tags:
......
......@@ -67,7 +67,7 @@ static char foo_deflate[] = "deflate";
static void do_free_zstream(z_stream *z)
{
/* Call deflteEnd() or inflateEnd(). But which? We use the opague
/* Call deflateEnd() or inflateEnd(). But which? We use the opague
* pointer, as we don't use that for anything else. */
int res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment