From 7841b971fb6e9c61d0ebcb209dfd0eb81d46eaa1 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Thu, 10 Jul 1997 12:54:14 +0000 Subject: [PATCH] Makefile.am and quick hacks git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2140 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/telnet/Makefile.am | 5 +++++ appl/telnet/libtelnet/Makefile.am | 10 ++++++++++ appl/telnet/telnet/Makefile.am | 13 +++++++++++++ appl/telnet/telnet/commands.c | 3 ++- appl/telnet/telnet/telnet.c | 3 ++- appl/telnet/telnet/telnet_locl.h | 1 - appl/telnet/telnetd/Makefile.am | 12 ++++++++++++ appl/telnet/telnetd/telnetd.c | 5 +++-- appl/telnet/telnetd/telnetd.h | 8 ++++++-- 9 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 appl/telnet/Makefile.am create mode 100644 appl/telnet/libtelnet/Makefile.am create mode 100644 appl/telnet/telnet/Makefile.am create mode 100644 appl/telnet/telnetd/Makefile.am diff --git a/appl/telnet/Makefile.am b/appl/telnet/Makefile.am new file mode 100644 index 000000000..b371319f4 --- /dev/null +++ b/appl/telnet/Makefile.am @@ -0,0 +1,5 @@ +# $Id$ + +AUTOHEADER_FLAGS = no-dependencies foreign + +SUBDIRS = libtelnet telnet telnetd diff --git a/appl/telnet/libtelnet/Makefile.am b/appl/telnet/libtelnet/Makefile.am new file mode 100644 index 000000000..542d6a4bd --- /dev/null +++ b/appl/telnet/libtelnet/Makefile.am @@ -0,0 +1,10 @@ +# $Id$ + +AUTOHEADER_FLAGS = no-dependencies foreign + +INCLUDES = -I$(top_builddir)/include -I$(srcdir)/.. + +noinst_LIBRARIES = libtelnet.a + +libtelnet_a_SOURCES = auth.c encrypt.c genget.c enc_des.c misc.c kerberos.c \ + kerberos5.c read_password.c diff --git a/appl/telnet/telnet/Makefile.am b/appl/telnet/telnet/Makefile.am new file mode 100644 index 000000000..97e20e7d6 --- /dev/null +++ b/appl/telnet/telnet/Makefile.am @@ -0,0 +1,13 @@ +# $Id$ + +AUTOHEADER_FLAGS = no-dependencies foreign + +INCLUDES = -I$(top_builddir)/include -I$(srcdir)/.. + +bin_PROGRAMS = telnet + +telnet_SOURCES = authenc.c commands.c main.c network.c ring.c \ + sys_bsd.c telnet.c terminal.c \ + utilities.c + +LDADD = -L../libtelnet -ltelnet -L$(top_builddir)/lib/krb5 -lkrb5 -L$(top_builddir)/lib/des -ldes -L$(top_builddir)/lib/asn1 -lasn1 @LIB_tgetent@ -L$(top_builddir)/lib/roken -lroken diff --git a/appl/telnet/telnet/commands.c b/appl/telnet/telnet/commands.c index b31c829fe..2703d7c42 100644 --- a/appl/telnet/telnet/commands.c +++ b/appl/telnet/telnet/commands.c @@ -1554,7 +1554,8 @@ env_init(void) char hbuf[256+1]; char *cp2 = strchr((char *)ep->value, ':'); - k_gethostname(hbuf, 256); + /* XXX - should be k_gethostname? */ + gethostname(hbuf, 256); hbuf[256] = '\0'; /* If this is not the full name, try to get it via DNS */ diff --git a/appl/telnet/telnet/telnet.c b/appl/telnet/telnet/telnet.c index ba5f845ab..c8795d565 100644 --- a/appl/telnet/telnet/telnet.c +++ b/appl/telnet/telnet/telnet.c @@ -1999,7 +1999,8 @@ telnet(char *user) static char local_host[256] = { 0 }; if (!local_host[0]) { - k_gethostname(local_host, sizeof(local_host)); + /* XXX - should be k_gethostname? */ + gethostname(local_host, sizeof(local_host)); local_host[sizeof(local_host)-1] = 0; } auth_encrypt_init(local_host, hostname, "TELNET", 0); diff --git a/appl/telnet/telnet/telnet_locl.h b/appl/telnet/telnet/telnet_locl.h index a3d4225c6..88410227d 100644 --- a/appl/telnet/telnet/telnet_locl.h +++ b/appl/telnet/telnet/telnet_locl.h @@ -136,7 +136,6 @@ #endif #include -#include #if defined(AUTHENTICATION) || defined(ENCRYPTION) #include diff --git a/appl/telnet/telnetd/Makefile.am b/appl/telnet/telnetd/Makefile.am new file mode 100644 index 000000000..3c90499ea --- /dev/null +++ b/appl/telnet/telnetd/Makefile.am @@ -0,0 +1,12 @@ +# $Id$ + +AUTOHEADER_FLAGS = no-dependencies foreign + +INCLUDES = -I$(top_builddir)/include -I$(srcdir)/.. + +libexec_PROGRAMS = telnetd + +telnetd_SOURCES = telnetd.c state.c termstat.c slc.c sys_term.c \ + utility.c global.c authenc.c + +LDADD = -L../libtelnet -ltelnet -L$(top_builddir)/lib/krb5 -lkrb5 -L$(top_builddir)/lib/des -ldes -L$(top_builddir)/lib/asn1 -lasn1 @LIB_tgetent@ -L$(top_builddir)/lib/roken -lroken diff --git a/appl/telnet/telnetd/telnetd.c b/appl/telnet/telnetd/telnetd.c index d87cd0370..0846707ed 100644 --- a/appl/telnet/telnetd/telnetd.c +++ b/appl/telnet/telnetd/telnetd.c @@ -346,7 +346,7 @@ int main(int argc, char **argv) else port = htons(atoi(*argv)); } else { - port = k_getportbyname ("telnet", "tcp", htons(23)); + port = krb5_getportbyname ("telnet", "tcp", htons(23)); } mini_inetd (port); } else if (argc > 0) { @@ -727,7 +727,8 @@ Please contact your net administrator"); remote_host_name[sizeof(remote_host_name)-1] = 0; host = remote_host_name; - k_gethostname(host_name, sizeof (host_name)); + /* XXX - should be k_gethostname? */ + gethostname(host_name, sizeof (host_name)); hostname = host_name; #ifndef abs diff --git a/appl/telnet/telnetd/telnetd.h b/appl/telnet/telnetd/telnetd.h index 92803d3b4..610725f71 100644 --- a/appl/telnet/telnetd/telnetd.h +++ b/appl/telnet/telnetd/telnetd.h @@ -151,8 +151,6 @@ #include #endif -#include - #ifdef SOCKS #include #endif @@ -174,6 +172,12 @@ /* Don't use the system login, use our version instead */ +/* BINDIR should be defined somewhere else... */ + +#ifndef BINDIR +#define BINDIR "/usr/athena" +#endif + #undef _PATH_LOGIN #define _PATH_LOGIN BINDIR "/login"