summaryrefslogtreecommitdiffstats
path: root/src/appl/telnet
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2001-06-22 15:42:19 +0000
committerEzra Peisach <epeisach@mit.edu>2001-06-22 15:42:19 +0000
commit6d46f766d236a8c735f427c0527aa6a2f69cfe16 (patch)
treef7637e54bc4038953a50391435ad32a4d026b23b /src/appl/telnet
parent52d5371f795363e2fa835bb7e86272f206191b40 (diff)
downloadkrb5-6d46f766d236a8c735f427c0527aa6a2f69cfe16.tar.gz
krb5-6d46f766d236a8c735f427c0527aa6a2f69cfe16.tar.xz
krb5-6d46f766d236a8c735f427c0527aa6a2f69cfe16.zip
* telnetd.c (main): Change variable sin to sin4.
(encrypt_failure): Change to not shadow global error_message. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13495 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/telnet')
-rw-r--r--src/appl/telnet/telnetd/ChangeLog5
-rw-r--r--src/appl/telnet/telnetd/telnetd.c22
2 files changed, 16 insertions, 11 deletions
diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog
index bcc94eff13..d14399e0a7 100644
--- a/src/appl/telnet/telnetd/ChangeLog
+++ b/src/appl/telnet/telnetd/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-22 Ezra Peisach <epeisach@mit.edu>
+
+ * telnetd.c (main): Change variable sin to sin4.
+ (encrypt_failure): Change to not shadow global error_message.
+
2001-06-21 Ezra Peisach <epeisach@mit.edu>
* telnetd.c: Add prototypes for getent() and tgetent().
diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c
index bff309d761..29c8f6aaa5 100644
--- a/src/appl/telnet/telnetd/telnetd.c
+++ b/src/appl/telnet/telnetd/telnetd.c
@@ -488,22 +488,22 @@ main(argc, argv)
if (debug) {
int s, ns, foo;
struct servent *sp;
- static struct sockaddr_in sin = { AF_INET };
+ static struct sockaddr_in sin4 = { AF_INET };
if (argc > 1) {
usage();
/* NOT REACHED */
} else if (argc == 1) {
if ((sp = getservbyname(*argv, "tcp"))) {
- sin.sin_port = sp->s_port;
+ sin4.sin_port = sp->s_port;
} else {
- sin.sin_port = atoi(*argv);
- if ((int)sin.sin_port <= 0) {
+ sin4.sin_port = atoi(*argv);
+ if ((int)sin4.sin_port <= 0) {
fprintf(stderr, "telnetd: %s: bad port #\n", *argv);
usage();
/* NOT REACHED */
}
- sin.sin_port = htons((u_short)sin.sin_port);
+ sin4.sin_port = htons((u_short)sin4.sin_port);
}
} else {
sp = getservbyname("telnet", "tcp");
@@ -511,7 +511,7 @@ main(argc, argv)
fprintf(stderr, "telnetd: tcp/telnet: unknown service\n");
exit(1);
}
- sin.sin_port = sp->s_port;
+ sin4.sin_port = sp->s_port;
}
s = socket(AF_INET, SOCK_STREAM, 0);
@@ -521,7 +521,7 @@ main(argc, argv)
}
(void) setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
(char *)&on, sizeof(on));
- if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
+ if (bind(s, (struct sockaddr *)&sin4, sizeof(sin4)) < 0) {
perror("bind");
exit(1);
}
@@ -529,8 +529,8 @@ main(argc, argv)
perror("listen");
exit(1);
}
- foo = sizeof(sin);
- ns = accept(s, (struct sockaddr *)&sin, &foo);
+ foo = sizeof(sin4);
+ ns = accept(s, (struct sockaddr *)&sin4, &foo);
if (ns < 0) {
perror("accept");
exit(1);
@@ -689,10 +689,10 @@ usage()
static void encrypt_failure()
{
- char *error_message =
+ char *lerror_message =
"Encryption was not successfully negotiated. Goodbye.\r\n\r\n";
- writenet(error_message, strlen(error_message));
+ writenet(lerror_message, strlen(lerror_message));
netflush();
exit(1);
}