diff options
author | charnier <charnier@FreeBSD.org> | 1997-12-08 07:41:13 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-12-08 07:41:13 +0000 |
commit | 25d74465e296aeafa9f165590252b3a190ed7d37 (patch) | |
tree | 80aae474ea825a57cadaebb6cb2af544503715e8 /crypto/telnet/telnetd/sys_term.c | |
parent | db661a8b0cd07e05505e16d7740d34c8f19bf4c8 (diff) | |
download | FreeBSD-src-25d74465e296aeafa9f165590252b3a190ed7d37.zip FreeBSD-src-25d74465e296aeafa9f165590252b3a190ed7d37.tar.gz |
MFC: no \n in syslog strings. Change -P to -p in flags. EOF -> -1. Use err(3).
Diffstat (limited to 'crypto/telnet/telnetd/sys_term.c')
-rw-r--r-- | crypto/telnet/telnetd/sys_term.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/crypto/telnet/telnetd/sys_term.c b/crypto/telnet/telnetd/sys_term.c index fe9509e..1e5b9d0 100644 --- a/crypto/telnet/telnetd/sys_term.c +++ b/crypto/telnet/telnetd/sys_term.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include "telnetd.h" @@ -184,6 +188,12 @@ int ttyfd = -1; # endif #endif /* USE_TERMIO */ +#include <sys/types.h> +#include <libutil.h> + +int cleanopen __P((char *)); +void scrub_env __P((void)); + /* * init_termbuf() * copy_termbuf(cp) @@ -1000,7 +1010,7 @@ struct termspeeds { #endif { -1, 0 } }; -#endif /* DECODE_BUAD */ +#endif /* DECODE_BAUD */ void tty_tspeed(val) @@ -1014,9 +1024,9 @@ tty_tspeed(val) if (tp->speed == -1) /* back up to last valid value */ --tp; cfsetospeed(&termbuf, tp->value); -#else /* DECODE_BUAD */ +#else /* DECODE_BAUD */ cfsetospeed(&termbuf, val); -#endif /* DECODE_BUAD */ +#endif /* DECODE_BAUD */ } void @@ -1075,8 +1085,7 @@ extern void utmp_sig_notify P((int)); * getptyslave() * * Open the slave side of the pty, and do any initialization - * that is necessary. The return value is a file descriptor - * for the slave side. + * that is necessary. */ void getptyslave() @@ -1789,7 +1798,7 @@ start_login(host, autologin, name) } execv(altlogin, argv); - syslog(LOG_ERR, "%s: %m\n", altlogin); + syslog(LOG_ERR, "%s: %m", altlogin); fatalperror(net, altlogin); /*NOTREACHED*/ } @@ -2088,7 +2097,7 @@ cleantmp(wtp) utp = getutid(wtp); if (utp == 0) { - syslog(LOG_ERR, "Can't get /etc/utmp entry to clean TMPDIR"); + syslog(LOG_ERR, "can't get /etc/utmp entry to clean TMPDIR"); return(-1); } /* @@ -2176,12 +2185,12 @@ cleantmpdir(jid, tpath, user) { switch(fork()) { case -1: - syslog(LOG_ERR, "TMPDIR cleanup(%s): fork() failed: %m\n", + syslog(LOG_ERR, "TMPDIR cleanup(%s): fork() failed: %m", tpath); break; case 0: execl(CLEANTMPCMD, CLEANTMPCMD, user, tpath, 0); - syslog(LOG_ERR, "TMPDIR cleanup(%s): execl(%s) failed: %m\n", + syslog(LOG_ERR, "TMPDIR cleanup(%s): execl(%s) failed: %m", tpath, CLEANTMPCMD); exit(1); default: |