|
|
b76cf7 |
--- netkit-telnet-0.17/telnetd/telnetd.c.orig 2011-01-31 12:05:37.942942871 -0600
|
|
|
b76cf7 |
+++ netkit-telnet-0.17/telnetd/telnetd.c 2011-01-31 18:20:22.400743499 -0600
|
|
|
b76cf7 |
@@ -82,6 +82,7 @@ char ptyibuf2[BUFSIZ];
|
|
|
b76cf7 |
int hostinfo = 1; /* do we print login banner? */
|
|
|
b76cf7 |
|
|
|
b76cf7 |
int debug = 0;
|
|
|
b76cf7 |
+int debugsix = 0;
|
|
|
b76cf7 |
int keepalive = 1;
|
|
|
b76cf7 |
char *loginprg = _PATH_LOGIN;
|
|
|
b76cf7 |
char *progname;
|
|
|
b76cf7 |
@@ -150,8 +151,11 @@ main(int argc, char *argv[], char *env[]
|
|
|
b76cf7 |
#endif /* BFTPDAEMON */
|
|
|
b76cf7 |
|
|
|
b76cf7 |
case 'd':
|
|
|
b76cf7 |
- if (strcmp(optarg, "ebug") == 0) {
|
|
|
b76cf7 |
+ if (strncmp(optarg, "ebug", 4) == 0) {
|
|
|
b76cf7 |
debug++;
|
|
|
b76cf7 |
+ if (strncmp(optarg, "ebug6", 5) == 0) {
|
|
|
b76cf7 |
+ debugsix++;
|
|
|
b76cf7 |
+ }
|
|
|
b76cf7 |
break;
|
|
|
b76cf7 |
}
|
|
|
b76cf7 |
usage();
|
|
|
b76cf7 |
@@ -271,6 +275,8 @@ main(int argc, char *argv[], char *env[]
|
|
|
b76cf7 |
hints.ai_socktype = SOCK_STREAM;
|
|
|
b76cf7 |
hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE;
|
|
|
b76cf7 |
hints.ai_protocol = IPPROTO_TCP;
|
|
|
b76cf7 |
+ if (debugsix)
|
|
|
b76cf7 |
+ hints.ai_family = AF_INET6;
|
|
|
b76cf7 |
|
|
|
b76cf7 |
if (argc == 0) {
|
|
|
b76cf7 |
if (getaddrinfo(NULL, "telnet", &hints, &ai) != 0) {
|
|
|
b76cf7 |
@@ -380,12 +386,12 @@ usage(void)
|
|
|
b76cf7 |
{
|
|
|
b76cf7 |
fprintf(stderr, "Usage: telnetd");
|
|
|
b76cf7 |
#ifdef AUTHENTICATE
|
|
|
b76cf7 |
- fprintf(stderr, " [-a (debug|other|user|valid|off)]\n\t");
|
|
|
b76cf7 |
+ fprintf(stderr, " [-a (debug|debug6|other|user|valid|off)]\n\t");
|
|
|
b76cf7 |
#endif
|
|
|
b76cf7 |
#ifdef BFTPDAEMON
|
|
|
b76cf7 |
fprintf(stderr, " [-B]");
|
|
|
b76cf7 |
#endif
|
|
|
b76cf7 |
- fprintf(stderr, " [-debug]");
|
|
|
b76cf7 |
+ fprintf(stderr, " [-debug|-debug6]");
|
|
|
b76cf7 |
#ifdef DIAGNOSTICS
|
|
|
b76cf7 |
fprintf(stderr, " [-D (options|report|exercise|netdata|ptydata)]\n\t");
|
|
|
b76cf7 |
#endif
|