summaryrefslogtreecommitdiffstats
path: root/src/appl/telnet/telnetd/state.c
Commit message (Collapse)AuthorAgeFilesLines
* Unbundle applications into separate repositoryGreg Hudson2009-11-221-1676/+0
| | | | | | | | | | | | | | | Remove libpty, gssftp, telnet, and the bsd applications from the source tree, build system, and tests. Docs still need to be updated to remove mentions of the applications. The build system should be simplified now that we're down to one configure script and don't need some of the functionality currently in aclocal.m4. ticket: 6583 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23305 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-311-2/+2
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* MITKRB5-SA-2007-001: telnetd allows login as arbitrary userTom Yu2007-04-031-1/+2
| | | | | | | | | | | | | | | | | | Fix MITKRB5-SA-2007-001: * src/appl/telnet/telnetd/sys_term.c (start_login): Add "--" argument preceding username, in addition to the original patch. Explicitly check for leading hyphen in username. * src/appl/telnet/telnetd/state.c (envvarok): Check for leading hyphen in environment variables. On advice from Shawn Emery, not using strchr() as in the original patch. ticket: new tags: pullup target_version: 1.6.1 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19396 dc483132-0cff-0310-8789-dd5450dbe970
* Increase buffer sizes to 64K where a Kerberos 5 authenticator might beKen Raeburn2006-06-151-1/+1
| | | | | | | | exchanged. Suggested by Markus Moeller. ticket: 2615 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18151 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Test for speed_t being presentEzra Peisach2002-11-151-1/+1
| | | | | | | | | * sys_term.c (addarg): When reallocing memory, ensure in size of pointer. Use speed_t instead of int for termspeeds. * authenc.c, ext.h, state.c, utility.c: Unsigned/signed cleanup. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15012 dc483132-0cff-0310-8789-dd5450dbe970
* Don't conditionalize prototypes; delete macros supporting it. (Maybe overdone;Ken Raeburn2001-10-101-1/+1
| | | | | | don't worry about restoring them when importing new versions of code.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13792 dc483132-0cff-0310-8789-dd5450dbe970
* * authenc.c (net_write): Rewrite in terms of netwrite()Tom Yu2001-08-021-20/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Check for vsnprintf(). * ext.h: New prototypes for netprintf, netprintf_urg, netprintf_noflush, netwrite, netputs. * slc.c: Fix to use new NETOBUF-handling functions. * state.c: Fix to use new NETOBUF-handling functions. * telnetd.c: Fix to use new NETOBUF-handling functions. * termstat.c: Fix to use new NETOBUF-handling functions. * utility.c: General rework to be more paranoid about bounds-checking of NETOBUF and NFRONTP. Abstract away interactions with NETOBUF to eliminate explicit references to NFRONTP in many places. (netwrite): New function; copies a buffer to the NETOBUF "ring buffer", checking bounds and calling netflush() if needed. (netputs): New function; calls netwrite() with a nul-terminated string. (netprintf, netprintf_ext): New function; wrap sprintf() with bounds checking for use with NETOBUF. (netprintf_urg): New function; like netprintf() except sets neturg to point at last char written. (netprintf_noflush): New function; like netprintf() except silently fails if NETOBUF is full. (ttloop, printoption, printsub, printdata): Fix to use new NETOBUF-handling functions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13669 dc483132-0cff-0310-8789-dd5450dbe970
* * state.c: Declate doclientstat() static and conditionalizeEzra Peisach2001-07-021-2/+4
| | | | | | | | | | | | | inclusion if LINEMODE defined. * sys_term.c: Declare getptyslave() and addard() static. * telnetd.c: Declare _gettermname() and getterminaltype() static. * utility.c: Declare putstr() and nextitem() static. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13540 dc483132-0cff-0310-8789-dd5450dbe970
* * ext.h: Remove unused prototype for start_slave() and replaceEzra Peisach2001-06-071-0/+3
| | | | | | | | | | | | | | | | | with one for startslave(). * state.c: Add libtlnet/encrypt.h for missing prototypes. * sys_term.c: Add prototype for dup_tty(). Change getptyslave() from int to void. Cleanup an assignment in conditional warning. * telnetd.c: Include libtelnet/misc-proto.h. Declare return from terminaltypeok() and main() as int. * utility.c: Include libtelnet/auth.h and libtelnet/encrypt.h for prototypes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13286 dc483132-0cff-0310-8789-dd5450dbe970
* * state.c (envvarok): Disallow LC_* and NLSPATHTom Yu2001-01-261-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12946 dc483132-0cff-0310-8789-dd5450dbe970
* jaltman fix for off-by-one errorKen Raeburn2000-03-201-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12128 dc483132-0cff-0310-8789-dd5450dbe970
* state.c: Increase size of subbufer so that we don't truncateTheodore Tso1999-02-041-1/+1
| | | | | | mongo-gram tickets from Microsoft. [telnet/688] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11143 dc483132-0cff-0310-8789-dd5450dbe970
* * utility.c (ptyflush, netflush): Explicitly reset SIGCHLD handlerTom Yu1998-02-241-0/+1
| | | | | | | | | | | | before calling cleanup(). [telnet/546] * telnetd.c (telnet): Explicitly reset SIGCHLD handler before calling cleanup(). [telnet/546] * state.c (dooption): Explicitly reset SIGCHLD handler before calling cleanup(). [telnet/546] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10471 dc483132-0cff-0310-8789-dd5450dbe970
* * telnetd.c (getterminaltype): Null-terminate strings and avoid aDan Winship1998-01-271-7/+5
| | | | | | | | | | | buffer overrun. * ext.h: make terminaltype a char[] instead of a char * for telnetd.c change * state.c (suboption): redo handling of terminaltype git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10380 dc483132-0cff-0310-8789-dd5450dbe970
* Prohibit the passing of TERMCAP, TERMPATH, TERMINFO, and HOME, sinceTheodore Tso1997-10-231-0/+4
| | | | | | they can be used to exploit a security in tgetent. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10248 dc483132-0cff-0310-8789-dd5450dbe970
* Don't allow the environment variable RESOLV_HOST_CONF to be set forTheodore Tso1996-09-071-0/+1
| | | | | | Linux's sake. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9057 dc483132-0cff-0310-8789-dd5450dbe970
* cygnus merge:Ken Raeburn1996-05-021-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Fix typo in Apr 16 HP-UX change. * state.c (envvarok): nuke all KRB5* environment variables, not just the previously selected ones. * telnetd.c (telnet -> doit): moved SIGTTOU handler before the first thing which would cause the terminal driver to get upset. * sys_term.c (line): Remove initialization silliness. The non-GNUC method was Just Wrong, do it the other way always. (Xline): Specify length, not contents. * termio-tn.c (readstream_termio): new file, provides isolated version of M_IOCTL handling for systems where termio and termios can't be compiled together. * termios-tn.c (readstream_termios): new file, provides isolated version of M_IOCTL handling for systems where termio and termios can't be compiled together. * telnetd.c (readstream): use readstream_termios and readstream_termio to handle getmsg with M_IOCTL. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7883 dc483132-0cff-0310-8789-dd5450dbe970
* More option handling changesSam Hartman1996-04-181-3/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7839 dc483132-0cff-0310-8789-dd5450dbe970
* * Changes to not use streams on HPUXSam Hartman1996-04-161-0/+16
| | | | | | | | * Changes to abort the session if telnetd receives certain options such as environment or DISPLAY options before authentication and encryption is negotiated or not negotiated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7818 dc483132-0cff-0310-8789-dd5450dbe970
* * state.c: use P properly so it won't break non-ansi compilersTom Yu1995-11-271-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7126 dc483132-0cff-0310-8789-dd5450dbe970
* Disallow changes to AOUT_LD_* environment variablesRichard Basch1995-10-251-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6995 dc483132-0cff-0310-8789-dd5450dbe970
* Reversed the check for strchr(). If strchr(varp, '=') is true then weRichard Basch1995-10-241-1/+1
| | | | | | reject the bad environment variable as it contains an =. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6993 dc483132-0cff-0310-8789-dd5450dbe970
* 1. Do not end syslog messages with \n (it messes up the logs).Richard Basch1995-10-231-24/+21
| | | | | | | | 2. Prototyped envvarok() to ensure proper usage. 3. Prohibit the change of ELF_LD_* environment variables (Linux) 4. Syslog attempts to pass bad environment variables. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6987 dc483132-0cff-0310-8789-dd5450dbe970
* Minor fix to last commitSam Hartman1995-10-221-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6980 dc483132-0cff-0310-8789-dd5450dbe970
* Integrate patch including functionality from David Borman's latestSam Hartman1995-10-211-0/+22
| | | | | | telnet, adapted for krb5. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6978 dc483132-0cff-0310-8789-dd5450dbe970
* stamp out rcs keywordsMark Eichin1994-08-181-3/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4188 dc483132-0cff-0310-8789-dd5450dbe970
* step 3: bcopy->memcpy or memmove (chose by hand), twiddle argsMark Eichin1994-06-151-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3815 dc483132-0cff-0310-8789-dd5450dbe970
* Updated telnet to be the 94.02.07 version, with some bugfixesTheodore Tso1994-06-101-43/+190
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3704 dc483132-0cff-0310-8789-dd5450dbe970
* Initial VersionTheodore Tso1993-03-091-0/+1473
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2524 dc483132-0cff-0310-8789-dd5450dbe970