- add "-debug6" option to telnetd (#rh674942)
- telnet wasn't interruptable (^C) when started with specious -b argument (#704604) Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
parent
34cc5957f2
commit
eab4c80347
|
@ -0,0 +1,47 @@
|
||||||
|
--- netkit-telnet-0.17/telnetd/telnetd.c.orig 2011-01-31 12:05:37.942942871 -0600
|
||||||
|
+++ netkit-telnet-0.17/telnetd/telnetd.c 2011-01-31 18:20:22.400743499 -0600
|
||||||
|
@@ -82,6 +82,7 @@ char ptyibuf2[BUFSIZ];
|
||||||
|
int hostinfo = 1; /* do we print login banner? */
|
||||||
|
|
||||||
|
int debug = 0;
|
||||||
|
+int debugsix = 0;
|
||||||
|
int keepalive = 1;
|
||||||
|
char *loginprg = _PATH_LOGIN;
|
||||||
|
char *progname;
|
||||||
|
@@ -150,8 +151,11 @@ main(int argc, char *argv[], char *env[]
|
||||||
|
#endif /* BFTPDAEMON */
|
||||||
|
|
||||||
|
case 'd':
|
||||||
|
- if (strcmp(optarg, "ebug") == 0) {
|
||||||
|
+ if (strncmp(optarg, "ebug", 4) == 0) {
|
||||||
|
debug++;
|
||||||
|
+ if (strncmp(optarg, "ebug6", 5) == 0) {
|
||||||
|
+ debugsix++;
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
usage();
|
||||||
|
@@ -271,6 +275,8 @@ main(int argc, char *argv[], char *env[]
|
||||||
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE;
|
||||||
|
hints.ai_protocol = IPPROTO_TCP;
|
||||||
|
+ if (debugsix)
|
||||||
|
+ hints.ai_family = AF_INET6;
|
||||||
|
|
||||||
|
if (argc == 0) {
|
||||||
|
if (getaddrinfo(NULL, "telnet", &hints, &ai) != 0) {
|
||||||
|
@@ -380,12 +386,12 @@ usage(void)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Usage: telnetd");
|
||||||
|
#ifdef AUTHENTICATE
|
||||||
|
- fprintf(stderr, " [-a (debug|other|user|valid|off)]\n\t");
|
||||||
|
+ fprintf(stderr, " [-a (debug|debug6|other|user|valid|off)]\n\t");
|
||||||
|
#endif
|
||||||
|
#ifdef BFTPDAEMON
|
||||||
|
fprintf(stderr, " [-B]");
|
||||||
|
#endif
|
||||||
|
- fprintf(stderr, " [-debug]");
|
||||||
|
+ fprintf(stderr, " [-debug|-debug6]");
|
||||||
|
#ifdef DIAGNOSTICS
|
||||||
|
fprintf(stderr, " [-D (options|report|exercise|netdata|ptydata)]\n\t");
|
||||||
|
#endif
|
|
@ -0,0 +1,24 @@
|
||||||
|
--- netkit-telnet-0.17/telnet/commands.c.hostalias 2011-07-11 08:07:22.000000000 -0400
|
||||||
|
+++ netkit-telnet-0.17/telnet/commands.c 2011-07-11 08:10:12.131039660 -0400
|
||||||
|
@@ -2400,17 +2400,21 @@
|
||||||
|
ahints.ai_family = PF_UNSPEC;
|
||||||
|
ahints.ai_socktype = SOCK_STREAM;
|
||||||
|
ahints.ai_flags = AI_PASSIVE;
|
||||||
|
error = getaddrinfo(aliasp, "0", &ahints, &ares);
|
||||||
|
if (error) {
|
||||||
|
+ printf ("Couldn't get address for %s\n", aliasp);
|
||||||
|
warn("%s: %s", aliasp, gai_strerror(error));
|
||||||
|
close(net);
|
||||||
|
+ net = -1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (bind(net, ares->ai_addr, ares->ai_addrlen) < 0) {
|
||||||
|
+ printf ("Couldn't bind to %s\n", aliasp);
|
||||||
|
perror(aliasp);
|
||||||
|
(void) close(net); /* dump descriptor */
|
||||||
|
+ net = -1;
|
||||||
|
freeaddrinfo(ares);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
freeaddrinfo(ares);
|
||||||
|
}
|
10
telnet.spec
10
telnet.spec
|
@ -1,7 +1,7 @@
|
||||||
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: 50%{?dist}
|
Release: 51%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
|
@ -28,6 +28,8 @@ Patch20: netkit-telnet-0.17-nodns.patch
|
||||||
Patch21: telnet-0.17-errno_test_sys_bsd.patch
|
Patch21: telnet-0.17-errno_test_sys_bsd.patch
|
||||||
Patch22: netkit-telnet-0.17-reallynodns.patch
|
Patch22: netkit-telnet-0.17-reallynodns.patch
|
||||||
Patch23: telnet-rh678324.patch
|
Patch23: telnet-rh678324.patch
|
||||||
|
Patch24: telnet-rh674942.patch
|
||||||
|
Patch25: telnet-rh704604.patch
|
||||||
|
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
@ -72,6 +74,8 @@ mv telnet telnet-NETKIT
|
||||||
%patch21 -p1 -b .errnosysbsd
|
%patch21 -p1 -b .errnosysbsd
|
||||||
%patch22 -p1 -b .reallynodns
|
%patch22 -p1 -b .reallynodns
|
||||||
%patch23 -p1 -b .rh678324
|
%patch23 -p1 -b .rh678324
|
||||||
|
%patch24 -p1 -b .rh674942
|
||||||
|
%patch25 -p1 -b .rh704604
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch s390 s390x
|
%ifarch s390 s390x
|
||||||
|
@ -131,6 +135,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||||
%{_mandir}/man8/telnetd.8*
|
%{_mandir}/man8/telnetd.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 13 2011 Adam Tkac <atkac redhat com> 1:0.17-51
|
||||||
|
- add "-debug6" option to telnetd (#rh674942)
|
||||||
|
- telnet wasn't interruptable (^C) when started with specious -b argument (#704604)
|
||||||
|
|
||||||
* Tue Jun 28 2011 Adam Tkac <atkac redhat com> 1:0.17-50
|
* Tue Jun 28 2011 Adam Tkac <atkac redhat com> 1:0.17-50
|
||||||
- telnetd: store "from" address in sockaddr_storage (#678324)
|
- telnetd: store "from" address in sockaddr_storage (#678324)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue