summaryrefslogtreecommitdiffstats
path: root/src/appl/telnet/telnetd/sys_term.c
Commit message (Collapse)AuthorAgeFilesLines
* Unbundle applications into separate repositoryGreg Hudson2009-11-221-1489/+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-16/+11
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except ↵Ken Raeburn2009-02-021-3/+3
| | | | | | unicode, windows code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21875 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of sprintf to snprintf or asprintfGreg Hudson2008-12-011-10/+8
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21258 dc483132-0cff-0310-8789-dd5450dbe970
* Use snprintf instead of strcpy/strcat in many placesGreg Hudson2008-10-231-3/+1
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20912 dc483132-0cff-0310-8789-dd5450dbe970
* MITKRB5-SA-2007-001: telnetd allows login as arbitrary userTom Yu2007-04-031-1/+24
| | | | | | | | | | | | | | | | | | 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
* * configure.in: Test for speed_t being presentEzra Peisach2002-11-151-2/+2
| | | | | | | | | * 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
* * sys_term.c (startslave): Get rid of extra argument in call toEzra Peisach2001-07-231-1/+1
| | | | | | getptyslave(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13625 dc483132-0cff-0310-8789-dd5450dbe970
* * sys_term.c (addarg): Cast char to long in indexing arrayEzra Peisach2001-07-061-4/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13570 dc483132-0cff-0310-8789-dd5450dbe970
* * state.c: Declate doclientstat() static and conditionalizeEzra Peisach2001-07-021-3/+3
| | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | | | | | 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
* 1.2-beta4 pullupKen Raeburn2000-06-301-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12470 dc483132-0cff-0310-8789-dd5450dbe970
* * sys_term.c (getptyslave): Under AIX, ignore I_PUSH pcktTom Yu1999-03-311-1/+4
| | | | | | failure. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11329 dc483132-0cff-0310-8789-dd5450dbe970
* sys_term.c: #include utmp.h if present, and use _PATH_WTMP andTheodore Tso1998-05-271-1/+14
| | | | | | | | | _PATH_UTMP if defined to determine location of the wtmp and utmp files. configure.in: Add check for utmp.h git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10592 dc483132-0cff-0310-8789-dd5450dbe970
* telnetd.c (main):Theodore Tso1998-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | telnetd-ktd.c (main): POSIX states that getopt returns -1 when it is done parsing options, not EOF. configure.in: Rename HAS_* to HAVE_* for the following tests: sac.h, sys/ptyvar.h, sys/filio.h, sys/stream.h, gettosbyname(), and make appropriate adjustments in the rest of the .c files. Remove tests which aren't being used anymore: vhangup, utmpx.h, utmp.h, etc. defs.h: Use HAVE_SYS_FILIO_H instead of FILIO_H sys_term.c: Use HAVE_SAC_H and HAVE_SYS_STREAM_H instead of HAS_SAC and STREAMS. telnetd.c, telnetd-ktd.c: Use HAVE_GETTOSBYNAME instead of HAS_GETTOS telnetd.c: Use HAVE_SYS_PTYVAR_H instead of HAS_PTYVAR. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10571 dc483132-0cff-0310-8789-dd5450dbe970
* * telnetd.c (getterminaltype): Null-terminate strings and avoid aDan Winship1998-01-271-1/+1
| | | | | | | | | | | 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
* * sys_term.c (start_login): Bounds check the constructed "speed"Tom Yu1997-04-101-2/+8
| | | | | | passed in to login. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10065 dc483132-0cff-0310-8789-dd5450dbe970
* Drop support for -u because it allows us to removeSam Hartman1996-06-241-220/+0
| | | | | | dependencies from utmp.h and it didn't work anyway. This fixes some Hpux compile problems as well. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8542 dc483132-0cff-0310-8789-dd5450dbe970
* cygnus merge:Ken Raeburn1996-05-021-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Call a krb5 cleanup routine to cleanup forwarded credentials, if necessaryRichard Basch1996-04-121-14/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7798 dc483132-0cff-0310-8789-dd5450dbe970
* * Apply patch from Ken Raeburn to get telnetd compiling on the SGISam Hartman1996-03-241-150/+3
| | | | | | | | | | | * Force telnetd not to use streams on the SGI; it doesn't support pushing modules onto a pty. * Remove old utmpx crud from sys_term.c because it was getting called inadvertently, didn't compile on the SGI, and libpty already does something reasonable with utmpx. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7705 dc483132-0cff-0310-8789-dd5450dbe970
* Mainline utmp and login cleanups from hartmans_pty_utmp:Sam Hartman1996-01-191-1/+2
| | | | | | | | * Fix utmp handling on Solaris for wtmpx records * Replace krlogin's SIGURG handler with a call to select squashing Solaris ctrl-c bug * Fix utmp on systems without pututline so ttyslot is only used when it works git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7338 dc483132-0cff-0310-8789-dd5450dbe970
* syslog statements should not be called with \nRichard Basch1995-10-231-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6984 dc483132-0cff-0310-8789-dd5450dbe970
* Changes for Alpha; also deal better with slave failureSam Hartman1995-08-091-7/+12
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6472 dc483132-0cff-0310-8789-dd5450dbe970
* Fix cc -std1 error on OSFPaul Park1995-08-081-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6468 dc483132-0cff-0310-8789-dd5450dbe970
* * Use new interface to pty_update_utmpSam Hartman1995-08-081-18/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6455 dc483132-0cff-0310-8789-dd5450dbe970
* Build fixes for SolarisPaul Park1995-08-071-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6437 dc483132-0cff-0310-8789-dd5450dbe970
* libpty fixesPaul Park1995-08-071-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6434 dc483132-0cff-0310-8789-dd5450dbe970
* Get telnetd working with libptySam Hartman1995-08-051-395/+43
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6423 dc483132-0cff-0310-8789-dd5450dbe970
* Make sure processes associated with the terminal are actuallySam Hartman1995-06-191-1/+10
| | | | | | | | dead before re-using the pty. This is a temporary fix; the real fix will make sure that the processes get a HUP when telnetd dies and will be part of the libpty changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6094 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in, sys_term.c, telnetd.c : Have configure check forChris Provenzano1995-04-261-1/+3
| | | | | | sys/ptyvar.h and sac.h before .c files include it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5486 dc483132-0cff-0310-8789-dd5450dbe970
* From Ian Taylor <ian@cygnus.com>.Mark Eichin1995-04-211-3/+5
| | | | | | | | | * telnetd.c (valid_opts): Add 'L'. If KRB5, add -R and -t. (main): Handle -L. If KRB5, handle -R and -t. * sys_term.c (login_program): New global variable. (start_login): Use login_program instead of LOGIN_PROGRAM. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5426 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid <krb5/...> includesJohn Gilmore1995-02-281-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5024 dc483132-0cff-0310-8789-dd5450dbe970
* Only include <sys/tty.h> if HAVE_SYS_TTY_H is defined by configureTheodore Tso1994-11-081-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4639 dc483132-0cff-0310-8789-dd5450dbe970
* Don't define time() manually; pull it in from <time.h>Theodore Tso1994-11-081-1/+0
| | | | | | Add checking for whether we should be pulling in <time.h> and <sys/time.h> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4636 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
* test for vhangupMark Eichin1994-08-161-0/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4162 dc483132-0cff-0310-8789-dd5450dbe970
* lintMark Eichin1994-08-141-1/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4134 dc483132-0cff-0310-8789-dd5450dbe970
* handle systems where setpgrp takes no argsMark Eichin1994-08-081-0/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4062 dc483132-0cff-0310-8789-dd5450dbe970
* * sys_term.h: fix linux lossage, i.e. <linux/tty.h>Tom Yu1994-08-041-0/+4
| | | | | | * configure.in: check for STREAMSPTY (hopefully) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4043 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
* step 2: bcmp->memcmpMark Eichin1994-06-151-4/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3810 dc483132-0cff-0310-8789-dd5450dbe970
* step 1: bzero->memset(,0,)Mark Eichin1994-06-151-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3809 dc483132-0cff-0310-8789-dd5450dbe970
* Updated telnet to be the 94.02.07 version, with some bugfixesTheodore Tso1994-06-101-85/+332
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3704 dc483132-0cff-0310-8789-dd5450dbe970
* Change dependencies on path.h to KRB5_PATH_TTY, KRB5_PATH_LOGIN, etcTheodore Tso1993-06-031-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2602 dc483132-0cff-0310-8789-dd5450dbe970
* Initial VersionTheodore Tso1993-03-091-0/+1900
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2524 dc483132-0cff-0310-8789-dd5450dbe970