summaryrefslogtreecommitdiffstats
path: root/src/appl/telnet/telnetd
diff options
context:
space:
mode:
Diffstat (limited to 'src/appl/telnet/telnetd')
-rw-r--r--src/appl/telnet/telnetd/pathnames.h2
-rw-r--r--src/appl/telnet/telnetd/slc.c14
-rw-r--r--src/appl/telnet/telnetd/state.c4
-rw-r--r--src/appl/telnet/telnetd/sys_term.c27
-rw-r--r--src/appl/telnet/telnetd/telnetd-ktd.c10
-rw-r--r--src/appl/telnet/telnetd/telnetd.c18
-rw-r--r--src/appl/telnet/telnetd/telnetd.h1
-rw-r--r--src/appl/telnet/telnetd/termio-tn.c2
-rw-r--r--src/appl/telnet/telnetd/termstat.c14
-rw-r--r--src/appl/telnet/telnetd/utility.c16
10 files changed, 51 insertions, 57 deletions
diff --git a/src/appl/telnet/telnetd/pathnames.h b/src/appl/telnet/telnetd/pathnames.h
index c8b0806e78..4e14a88b49 100644
--- a/src/appl/telnet/telnetd/pathnames.h
+++ b/src/appl/telnet/telnetd/pathnames.h
@@ -42,7 +42,7 @@
# endif
#else
-
+
# define _PATH_TTY "/dev/tty"
# ifndef _PATH_LOGIN
# define _PATH_LOGIN "/bin/login"
diff --git a/src/appl/telnet/telnetd/slc.c b/src/appl/telnet/telnetd/slc.c
index 8f32f433ab..d5e2713a4e 100644
--- a/src/appl/telnet/telnetd/slc.c
+++ b/src/appl/telnet/telnetd/slc.c
@@ -107,10 +107,10 @@ get_slc_defaults()
init_termbuf();
for (i = 1; i <= NSLC; i++) {
- slctab[i].defset.flag =
+ slctab[i].defset.flag =
spcset(i, &slctab[i].defset.val, &slctab[i].sptr);
- slctab[i].current.flag = SLC_NOSUPPORT;
- slctab[i].current.val = 0;
+ slctab[i].current.flag = SLC_NOSUPPORT;
+ slctab[i].current.val = 0;
}
} /* end of get_slc_defaults */
@@ -285,7 +285,7 @@ change_slc(func, flag, val)
register cc_t val;
{
register int hislevel, mylevel;
-
+
hislevel = flag & SLC_LEVELBITS;
mylevel = slctab[func].defset.flag & SLC_LEVELBITS;
/*
@@ -344,7 +344,7 @@ change_slc(func, flag, val)
* request as he asks.
*
* If our level is DEFAULT, then just ack whatever was
- * sent.
+ * sent.
*
* If he can't change and we can't change,
* then degenerate to NOSUPPORT.
@@ -371,7 +371,7 @@ change_slc(func, flag, val)
slctab[func].defset.val;
val = slctab[func].current.val;
}
-
+
}
add_slc(func, flag, val);
}
@@ -422,7 +422,7 @@ check_slc()
slctab[i].current.val);
}
}
-
+
} /* check_slc */
/*
diff --git a/src/appl/telnet/telnetd/state.c b/src/appl/telnet/telnetd/state.c
index 4693fc9126..17d6fb6e89 100644
--- a/src/appl/telnet/telnetd/state.c
+++ b/src/appl/telnet/telnetd/state.c
@@ -403,7 +403,7 @@ gotiac: switch (c) {
* All state defaults are negative, and resp defaults to 0.
*
* When initiating a request to change state to new_state:
- *
+ *
* if ((want_resp == 0 && new_state == my_state) || want_state == new_state) {
* do nothing;
* } else {
@@ -1121,7 +1121,7 @@ suboption()
break;
sb_auth_complete();
-
+
settimer(tspeedsubopt);
if (SB_EOF() || SB_GET() != TELQUAL_IS)
diff --git a/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c
index a0a0ee5038..1535ac8383 100644
--- a/src/appl/telnet/telnetd/sys_term.c
+++ b/src/appl/telnet/telnetd/sys_term.c
@@ -72,7 +72,7 @@ char utmpf[] = _PATH_UTMP;
#else
char utmpf[] = "/etc/utmp";
#endif
-
+
# ifdef CRAY
#include <tmpdir.h>
#include <sys/wait.h>
@@ -96,7 +96,7 @@ extern struct sysv sysv;
#ifdef STREAMSPTY
#ifdef HAVE_SAC_H
-#include <sac.h>
+#include <sac.h>
#endif
#include <sys/stropts.h>
#endif
@@ -115,7 +115,7 @@ extern struct sysv sysv;
#ifdef HAVE_SYS_TTY_H
#include <sys/tty.h>
#endif
-
+
#ifdef t_erase
#undef t_erase
#undef t_kill
@@ -1076,9 +1076,9 @@ startslave(host, autologin, autoname)
register int n;
#endif /* NEWINIT */
- if ( pipe(syncpipe) < 0 )
+ if ( pipe(syncpipe) < 0 )
fatal(net, "failed getting synchronization pipe");
-
+
#if defined(AUTHENTICATION)
if (!autoname || !autoname[0])
autologin = 0;
@@ -1110,9 +1110,9 @@ startslave(host, autologin, autoname)
}
close(syncpipe[0]);
-
+
} else {
-
+
pty_update_utmp (PTY_LOGIN_PROCESS, getpid(), "LOGIN", line,
host, PTY_TTYSLOT_USABLE);
getptyslave();
@@ -1121,7 +1121,7 @@ startslave(host, autologin, autoname)
write(syncpipe[1],"y",1);
close(syncpipe[0]);
close(syncpipe[1]);
-
+
start_login(host, autologin, autoname);
/*NOTREACHED*/
}
@@ -1275,7 +1275,7 @@ start_login(host, autologin, name)
if (bftpd) {
argv = addarg(argv, "-e");
argv = addarg(argv, BFTPPATH);
- } else
+ } else
#endif
#if defined (SecurID)
/*
@@ -1431,7 +1431,7 @@ start_login(host, autologin, name)
/*
* This code returns a pointer to the first element of the array and
* expects the same to be called with.
- * Therefore the -1 reference is legal.
+ * Therefore the -1 reference is legal.
*/
static char **
@@ -1483,12 +1483,7 @@ cleanup(sig)
#ifdef KRB5
kerberos5_cleanup();
#endif
-
+
(void) shutdown(net, 2);
exit(1);
}
-
-
-
-
-
diff --git a/src/appl/telnet/telnetd/telnetd-ktd.c b/src/appl/telnet/telnetd/telnetd-ktd.c
index 5a340bd7fb..86a594c6e9 100644
--- a/src/appl/telnet/telnetd/telnetd-ktd.c
+++ b/src/appl/telnet/telnetd/telnetd-ktd.c
@@ -390,7 +390,7 @@ main(argc, argv)
secflag = sysconf(_SC_CRAY_SECURE_SYS);
/*
- * Get socket's security label
+ * Get socket's security label
*/
if (secflag) {
int sz = sizeof(ss);
@@ -704,13 +704,13 @@ doit(who)
*/
if ( (retval = pty_getpty(&pty, line, sizeof(line)) < 0 ) {
com_err(retval, "telnetd", "");
-
+
if (pty < 0)
fatal(net, "All network ports in use");
#if defined(_SC_CRAY_SECURE_SYS)
/*
- * set ttyp line security label
+ * set ttyp line security label
*/
if (secflag) {
extern char *myline;
@@ -1278,7 +1278,7 @@ telnet(f, p, host)
}
cleanup(0);
} /* end of telnet */
-
+
#ifndef TCSIG
# ifdef TIOCSIG
# define TCSIG TIOCSIG
@@ -1354,7 +1354,7 @@ int readstream(p, ibuf, bufsize)
tp = (struct termio *) (ibuf+1 + sizeof(struct iocblk));
vstop = tp->c_cc[VSTOP];
vstart = tp->c_cc[VSTART];
- ixon = tp->c_iflag & IXON;
+ ixon = tp->c_iflag & IXON;
break;
default:
errno = EAGAIN;
diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c
index 8ee129ec34..86280f3dcd 100644
--- a/src/appl/telnet/telnetd/telnetd.c
+++ b/src/appl/telnet/telnetd/telnetd.c
@@ -199,7 +199,7 @@ get_default_IM()
{
struct utsname name;
static char banner[1024];
-
+
if (uname(&name) < 0)
snprintf(banner, sizeof(banner),
"\r\nError getting hostname: %s\r\n",
@@ -399,7 +399,7 @@ main(argc, argv)
{
extern krb5_context telnet_context;
krb5_error_code retval;
-
+
if (telnet_context == 0) {
retval = krb5_init_context(&telnet_context);
if (retval) {
@@ -640,7 +640,7 @@ main(argc, argv)
#endif /* defined(IPPROTO_IP) && defined(IP_TOS) */
net = 0;
doit((struct sockaddr *)&from);
-
+
/* NOTREACHED */
return 0;
} /* end of main */
@@ -765,7 +765,7 @@ getterminaltype(name)
}
if (must_encrypt || auth_must_encrypt()) {
time_t timeout = time(0) + 60;
-
+
if (my_state_is_dont(TELOPT_ENCRYPT) ||
my_state_is_wont(TELOPT_ENCRYPT) ||
his_state_is_wont(TELOPT_AUTHENTICATION))
@@ -956,7 +956,7 @@ static void doit(who)
* Find an available pty to use.
*/
pty_init();
-
+
if ((retval = pty_getpty(&pty, line, 17)) != 0) {
fatal(net, error_message(retval));
@@ -964,7 +964,7 @@ static void doit(who)
#if defined(_SC_CRAY_SECURE_SYS)
/*
- * set ttyp line security label
+ * set ttyp line security label
*/
if (secflag) {
char slave_dev[16];
@@ -1549,7 +1549,7 @@ telnet(f, p, host)
(void) signal(SIGCHLD, SIG_DFL);
cleanup(0);
} /* end of telnet */
-
+
#ifndef TCSIG
# ifdef TIOCSIG
# define TCSIG TIOCSIG
@@ -1608,9 +1608,9 @@ int readstream(p, ibuf, bufsize)
case M_IOCTL:
ip = (struct iocblk *) (ibuf+1);
- if (readstream_termio(ip->ioc_cmd, ibuf,
+ if (readstream_termio(ip->ioc_cmd, ibuf,
&vstop, &vstart, &ixon)) {
- if (readstream_termios(ip->ioc_cmd, ibuf,
+ if (readstream_termios(ip->ioc_cmd, ibuf,
&vstop, &vstart, &ixon)) {
errno = EAGAIN;
return(-1);
diff --git a/src/appl/telnet/telnetd/telnetd.h b/src/appl/telnet/telnetd/telnetd.h
index f21f617e53..48980c5b6d 100644
--- a/src/appl/telnet/telnetd/telnetd.h
+++ b/src/appl/telnet/telnetd/telnetd.h
@@ -45,4 +45,3 @@
/* other external variables */
extern char **environ;
-
diff --git a/src/appl/telnet/telnetd/termio-tn.c b/src/appl/telnet/telnetd/termio-tn.c
index 7447f1eec3..8f27d59d3b 100644
--- a/src/appl/telnet/telnetd/termio-tn.c
+++ b/src/appl/telnet/telnetd/termio-tn.c
@@ -25,7 +25,7 @@ int readstream_termio(cmd, ibuf, vstop, vstart, ixon)
*vstop = tp->c_cc[VSTOP];
*vstart = tp->c_cc[VSTART];
#endif
- *ixon = tp->c_iflag & IXON;
+ *ixon = tp->c_iflag & IXON;
return 0;
}
return -1;
diff --git a/src/appl/telnet/telnetd/termstat.c b/src/appl/telnet/telnetd/termstat.c
index fa7803dfe3..d620719978 100644
--- a/src/appl/telnet/telnetd/termstat.c
+++ b/src/appl/telnet/telnetd/termstat.c
@@ -316,7 +316,7 @@ localstat()
IAC, SE);
editmode = useeditmode;
}
-
+
/*
* Check for changes to special characters in use.
@@ -416,7 +416,7 @@ clientstat(code, parm1, parm2)
uselinemode = 1;
}
}
-
+
/*
* Quit now if we can't do it.
*/
@@ -456,7 +456,7 @@ clientstat(code, parm1, parm2)
send_will(TELOPT_ECHO, 1);
}
break;
-
+
case LM_MODE:
{
register int ack, changed;
@@ -504,7 +504,7 @@ clientstat(code, parm1, parm2)
useeditmode|MODE_ACK,
IAC, SE);
}
-
+
editmode = useeditmode;
}
@@ -538,9 +538,9 @@ clientstat(code, parm1, parm2)
(void) ioctl(pty, TIOCSWINSZ, (char *)&ws);
}
#endif /* TIOCSWINSZ */
-
+
break;
-
+
case TELOPT_TSPEED:
{
def_tspeed = parm1;
@@ -605,7 +605,7 @@ _termstat()
*
* Some things should not be done until after the login process has started
* and all the pty modes are set to what they are supposed to be. This
- * function is called when the pty state has been processed for the first time.
+ * function is called when the pty state has been processed for the first time.
* It calls other functions that do things that were deferred in each module.
*/
void
diff --git a/src/appl/telnet/telnetd/utility.c b/src/appl/telnet/telnetd/utility.c
index 4a4c1308e5..7e53c486ca 100644
--- a/src/appl/telnet/telnetd/utility.c
+++ b/src/appl/telnet/telnetd/utility.c
@@ -90,7 +90,7 @@ read_again:
}
} /* end of ttloop */
-/*
+/*
* ttsuck - This is a horrible kludge to deal with a bug in
* HostExplorer. HostExplorer thinks it knows how to do krb5 auth, but
* it doesn't really. So if you offer it krb5 as an auth choice before
@@ -872,7 +872,7 @@ printsub(direction, pointer, length)
break;
}
break;
-
+
case LM_SLC:
netputs("SLC");
for (i = 2; i < length - 2; i += 3) {
@@ -1010,7 +1010,7 @@ do { \
netputs("\r\n");
break;
-
+
default:
netprintf(" %d", pointer[i]);
break;
@@ -1103,7 +1103,7 @@ do { \
#if defined(AUTHENTICATION)
case TELOPT_AUTHENTICATION:
netputs("AUTHENTICATION");
-
+
if (length < 2) {
netputs(" (empty suboption??\?)");
break;
@@ -1127,7 +1127,7 @@ do { \
netputs(((pointer[3] & AUTH_ENCRYPT_MASK) == AUTH_ENCRYPT_ON)
? "|ENCRYPT" : "");
- auth_printsub(&pointer[1], length - 1, (unsigned char *)buf,
+ auth_printsub(&pointer[1], length - 1, (unsigned char *)buf,
sizeof(buf));
netputs(buf);
break;
@@ -1215,7 +1215,7 @@ do { \
netprintf("%d (unknown)", pointer[2]);
netputs(" ");
- encrypt_printsub(&pointer[1], length - 1,
+ encrypt_printsub(&pointer[1], length - 1,
(unsigned char *) buf, sizeof(buf));
netputs(buf);
break;
@@ -1283,7 +1283,7 @@ printdata(tag, ptr, cnt)
netputs(": ");
for (i = 0; i < 20 && cnt; i++) {
netprintf(nfrontp, "%02x", *ptr);
- nfrontp += strlen(nfrontp);
+ nfrontp += strlen(nfrontp);
if (isprint((int) *ptr)) {
xbuf[i] = *ptr;
} else {
@@ -1298,6 +1298,6 @@ printdata(tag, ptr, cnt)
netputs(" ");
netputs(xbuf);
netputs("\r\n");
- }
+ }
}
#endif /* DIAGNOSTICS */