auto-import telnet-0.17-15 from telnet-0.17-15.src.rpm

This commit is contained in:
cvsdist 2004-09-09 13:09:21 +00:00
parent c1c159d12f
commit acb6917806
7 changed files with 1862 additions and 87 deletions

View File

@ -1,2 +1,2 @@
netkit-telnet-0.17-pre20000412.tar.gz netkit-telnet-0.17.tar.gz
telnet-client.tar.gz telnet-client.tar.gz

View File

@ -1,2 +1,2 @@
e2d1af881cd1527dd30f4d4551000cf6 netkit-telnet-0.17-pre20000412.tar.gz d6beabaaf53fe6e382c42ce3faa05a36 netkit-telnet-0.17.tar.gz
d74983062470c5a3e7ae14f34c489e00 telnet-client.tar.gz d74983062470c5a3e7ae14f34c489e00 telnet-client.tar.gz

View File

@ -32,8 +32,8 @@
free(tnamep); free(tnamep);
- if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) && - if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) &&
+ if ((tname = (char *)env_getvalue((unsigned char *)"TERM", 0)) && + if ((tname = (char *)env_getvalue((unsigned char *)"TERM", 0)) &&
(telnet_setupterm(tname, 1, &err) == 0)) { (setupterm(tname, 1, &errret) == 0)) {
tnamep = mklist(termbuf, tname); tnamep = mklist(ttytype, tname);
} else { } else {
@@ -870,7 +870,7 @@ @@ -870,7 +870,7 @@
unsigned char temp[50], *dp; unsigned char temp[50], *dp;
@ -82,75 +82,3 @@
int get_status (void); int get_status (void);
int dosynch (void); int dosynch (void);
--- netkit-telnet-0.17-pre-20000204/telnet-NETKIT/telnet.cc.env Thu Aug 19 05:34:15 1999
+++ netkit-telnet-0.17-pre-20000204/telnet-NETKIT/telnet.cc Tue May 16 17:22:40 2000
@@ -456,7 +456,7 @@
break;
case TELOPT_XDISPLOC: /* X Display location */
- if (env_getvalue("DISPLAY"))
+ if (env_getvalue("DISPLAY", 0))
new_state_ok = 1;
break;
@@ -636,7 +636,7 @@
if (resettermname) {
resettermname = 0;
- tname = env_getvalue("TERM");
+ tname = env_getvalue("TERM", 0);
if (!tname || my_setupterm(tname, 1, &err)) {
termbuf[0] = 0;
tname = "UNKNOWN";
@@ -769,7 +769,7 @@
if (SB_EOF())
return;
if (SB_GET() == TELQUAL_SEND) {
- const char *dp = env_getvalue("DISPLAY");
+ const char *dp = env_getvalue("DISPLAY", 0);
if (dp == NULL) {
/*
* Something happened, we no longer have a DISPLAY
@@ -1182,7 +1182,7 @@
for (ep = env_next(&i,1); ep; ep = env_next(&i,1)) env_opt_add(ep);
return;
}
- vp = env_getvalue(ep);
+ vp = env_getvalue(ep, 1);
if (opt_replyp + (vp ? strlen(vp) : 0) + strlen(ep) + 6 > opt_replyend)
{
register int len;
@@ -1736,7 +1736,7 @@
send_will(TELOPT_LINEMODE, 1);
send_will(TELOPT_ENVIRON, 1);
send_do(TELOPT_STATUS, 1);
- if (env_getvalue("DISPLAY"))
+ if (env_getvalue("DISPLAY", 0))
send_will(TELOPT_XDISPLOC, 1);
if (eight)
tel_enter_binary(eight);
--- netkit-telnet-0.17-pre-20000204/telnet-NETKIT/environ.cc.env Thu Aug 19 05:34:15 1999
+++ netkit-telnet-0.17-pre-20000204/telnet-NETKIT/environ.cc Tue May 16 17:19:47 2000
@@ -193,8 +193,9 @@
return NULL;
}
-const char *env_getvalue(const char *var) {
+const char *env_getvalue(const char *var, int exported_only) {
enviro *ep = env_find(var);
- if (ep) return ep->getval();
+ if (ep && (!exported_only || ep->getexport()))
+ return ep->getval();
return NULL;
}
--- netkit-telnet-0.17-pre-20000204/telnet-NETKIT/environ.h.env Tue Aug 13 20:48:59 1996
+++ netkit-telnet-0.17-pre-20000204/telnet-NETKIT/environ.h Tue May 16 17:19:47 2000
@@ -4,7 +4,7 @@
void env_unexport(const char *);
void env_send(const char *);
void env_list(void);
-const char *env_getvalue(const char *);
+const char *env_getvalue(const char *, int exported_only);
void env_iterate(int *, int exported_only);
const char *env_next(int *, int exported_only);

81
telnet-0.17-issue.patch Normal file
View File

@ -0,0 +1,81 @@
--- netkit-telnet-0.17/telnetd/utility.c.issue Sun Dec 12 09:59:45 1999
+++ netkit-telnet-0.17/telnetd/utility.c Wed Jul 18 11:14:11 2001
@@ -460,13 +460,13 @@
putlocation = where;
while (*cp) {
- if (*cp != '%') {
+ if (*cp != '%' && *cp != '\\') {
putchr(*cp++);
continue;
}
switch (*++cp) {
- case 't':
+ case 'l':
slash = strrchr(line, '/');
if (slash == NULL)
putstr(line);
@@ -474,21 +474,28 @@
putstr(slash+1);
break;
+ case 'n':
case 'h':
putstr(editedhost);
break;
+ case 't':
case 'd':
(void)time(&t);
(void)strftime(db, sizeof(db), fmtstr, localtime(&t));
putstr(db);
break;
+ case '\\':
+ putchr('\\');
+ break;
+
case '%':
putchr('%');
break;
case 'D':
+ case 'o':
{
char buff[128];
@@ -515,7 +522,7 @@
c = fgetc(fp);
} while (c != EOF && c != '\n');
continue;
- } else if (c == '%') {
+ } else if (c == '%' || c == '\\') {
buff[0] = c;
c = fgetc(fp);
if (c == EOF) break;
--- netkit-telnet-0.17/telnetd/issue.net.5.issue Sun Jul 30 19:57:09 2000
+++ netkit-telnet-0.17/telnetd/issue.net.5 Wed Jul 18 11:03:09 2001
@@ -15,16 +15,17 @@
.Pa /etc/issue.net
is a text file which contains a message or system identification to be
printed before the login prompt of a telnet session. It may contain
-various `%-char' sequences. The following sequences are supported by
+various `%-char' (or, alternatively, '\\-char') sequences. The following
+sequences are supported by
.Ic telnetd :
.Bl -tag -offset indent -compact -width "abcde"
-.It %t
+.It %l
- show the current tty
-.It %h
+.It %h, %n
- show the system node name (FQDN)
-.It %D
+.It %D, %o
- show the name of the NIS domain
-.It %d
+.It %d, %t
- show the current time and date
.It %s
- show the name of the operating system

1721
telnet-client-cvs.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,17 @@
%define _snapshot -pre20000412
Summary: The client program for the telnet remote login protocol. Summary: The client program for the telnet remote login protocol.
Name: telnet Name: telnet
Version: 0.17 Version: 0.17
Release: 10 Release: 15
Copyright: BSD Copyright: BSD
Group: Applications/Internet Group: Applications/Internet
Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-telnet-%{version}%{_snapshot}.tar.gz Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-telnet-%{version}.tar.gz
Source2: telnet-client.tar.gz Source2: telnet-client.tar.gz
Source3: telnet-xinetd Source3: telnet-xinetd
Patch4: telnet-0.10-escapechar.patch Patch1: telnet-client-cvs.patch
Patch5: telnetd-0.17.diff
Patch6: telnet-0.17-env.patch Patch6: telnet-0.17-env.patch
Patch7: telnet-0.17-issue.patch
BuildPreReq: ncurses-devel
Buildroot: %{_tmppath}/%{name}-root Buildroot: %{_tmppath}/%{name}-root
%description %description
@ -19,6 +20,8 @@ Internet. The telnet package provides a command line telnet client.
Install the telnet package if you want to telnet to remote machines. Install the telnet package if you want to telnet to remote machines.
This version has support for IPv6.
%package server %package server
Requires: xinetd Requires: xinetd
Group: System Environment/Daemons Group: System Environment/Daemons
@ -35,16 +38,17 @@ Install the telnet-server package if you want to support remote logins
to your own machine. to your own machine.
%prep %prep
%setup -q -n netkit-telnet-%{version}%{_snapshot} %setup -q -n netkit-telnet-%{version}
mv telnet telnet-NETKIT mv telnet telnet-NETKIT
%setup -T -D -q -a 2 -n netkit-telnet-%{version}%{_snapshot} %setup -T -D -q -a 2 -n netkit-telnet-%{version}
%patch4 -p1 -b .escapechar %patch1 -p0 -b .cvs
%patch5 -p0 -b .fix
%patch6 -p1 -b .env %patch6 -p1 -b .env
%patch7 -p1 -b .issue
%build %build
sh configure sh configure --with-c-compiler=gcc
perl -pi -e ' perl -pi -e '
s,^CC=.*$,CC=cc,; s,^CC=.*$,CC=cc,;
s,-O2,\$(RPM_OPT_FLAGS),; s,-O2,\$(RPM_OPT_FLAGS),;
@ -91,7 +95,7 @@ rm -rf ${RPM_BUILD_ROOT}
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%config(missingok) /etc/X11/applnk/Internet/telnet.desktop #%config(missingok) /etc/X11/applnk/Internet/telnet.desktop
%{_bindir}/telnet %{_bindir}/telnet
%{_mandir}/man1/telnet.1* %{_mandir}/man1/telnet.1*
@ -104,6 +108,26 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man8/telnetd.8* %{_mandir}/man8/telnetd.8*
%changelog %changelog
* Sat Jul 21 2001 Tim Powers <timp@redhat.com>
- no applnk file, it's clutrtering the menus
* Wed Jul 17 2001 Bill Nottingham <notting@redhat.com>
- apply the patch, duh (and fix it while we're here)
* Tue Jul 10 2001 Bill Nottingham <notting@redhat.com>
- make /etc/issue.net parsing match the various gettys
* Mon Jun 18 2001 Harald Hoyer <harald@redhat.de>
- merged Jakubs and Pekka's patches
* Wed Apr 4 2001 Jakub Jelinek <jakub@redhat.com>
- don't let configure to guess compiler, it can pick up egcs
* Fri Mar 9 2001 Pekka Savola <pekkas@netcore.fi>
- update to 0.17
- apply latest changes from CVS to telnet client, enable IPv6
- BuildPreReq ncurses-devel
* Mon Jan 22 2001 Helge Deller <hdeller@redhat.com> * Mon Jan 22 2001 Helge Deller <hdeller@redhat.com>
- added swedish & german translation to .desktop-file (#15332) - added swedish & german translation to .desktop-file (#15332)

21
telnetd-0.17.diff Normal file
View File

@ -0,0 +1,21 @@
--- telnetd/telnetd.c Thu Apr 13 00:36:12 2000
+++ telnetd.new/telnetd.c Sun Mar 11 03:10:43 2001
@@ -44,7 +44,7 @@
#include "../version.h"
#include <netdb.h>
-#include <termcap.h>
+#include <ncurses/termcap.h>
#include <netinet/in.h>
/* #include <netinet/ip.h> */ /* Don't think this is used at all here */
#include <arpa/inet.h>
--- telnetd/defs.h Mon Aug 2 06:14:03 1999
+++ telnetd.new/defs.h Sun Mar 11 03:28:13 2001
@@ -56,6 +56,7 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/telnet.h>