summaryrefslogtreecommitdiffstats
path: root/libexec/getty/main.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r262136brueffer2014-02-241-5/+1
| | | | | | | Remove the 3rd clause ("advertising clause") of the BSD license as permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp
* Add __unused. Ansi prototypes.charnier2010-12-201-3/+3
|
* Add a new libc function: cfmakesane(3).ed2010-11-021-5/+7
| | | | | | | | | | | I've noticed various terminal emulators that need to obtain a sane default termios structure use very complex `hacks'. Even though POSIX doesn't provide any functionality for this, extend our termios API with cfmakesane(3), which is similar to the commonly supported cfmakeraw(3), except that it fills the termios structure with sane defaults. Change all code in our base system to use this function, instead of depending on <sys/ttydefaults.h> to provide TTYDEF_*.
* Include gettytab.h before extern.h so that the declarations of structstefanf2005-04-061-1/+1
| | | | gettyflags, gettynums and gettystrs are available.
* Report once that the device isn't there, but keep trying. Don'timp2004-09-291-21/+14
| | | | | filter the errno values. They don't make as much sense as they used to given how we do devices in /dev.
* Prototype defttymode() instead of just declaring it.yar2003-07-181-1/+1
|
* - Use the initial terminal mode instead of the current modeyar2003-06-181-59/+50
| | | | | | | | | | as the source of defaults for terminal device parameters. - Do duplucate code reduction and simplification enabled by the above. Reviewed by: green MFC after: 1 month
* In the last clean-up of this code, the fact that the default tty modegreen2003-06-141-6/+20
| | | | | | | | information could only be gleaned from the the tty descriptor itself was neglected, so never did the tty's default settings get copied from the kernel. Specifically, this caused all manner of ctrl-keys to not work. Fix this by calling dogettytab() in all the proper places, and retrieving the terminfo temporarily in dogettytab().
* Read gettytab(5) soon enough to fill in all necessary values.yar2003-06-101-16/+39
| | | | | | | | | Re-read gettytab(5) only if needed. This fixes bugs introduced as long ago as in getty/main.c rev.1.15. PR: bin/18181 MFC after: 1 month
* Spot one more place where boolean variables were incrementedyar2003-06-101-1/+1
| | | | instead of just being assigned a truth value.
* Coding style fix: Use "foo = 1" instead of "foo++" to assignyar2003-06-101-2/+2
| | | | | the truth value to a boolean variable, especially when inside a loop. The variable can overflow otherwise, at least in theory.
* Fix some minor bugs, namely:yar2003-06-061-3/+14
| | | | | | | | | | | | | | | | | | | | - Initialize "rval", which would be used uninitialized if al or pl options were set. - Don't pass an empty string to login(1) as a user name (this could be triggered by entering a name and then killing it with backspace or ^U.) - Don't loop endlessly if the al option specifies a bogus (i.e., not alphanumeric) auto-login name. - Don't pass a bogus user name to login(1) if a good name were entered and then killed with ^U. - Exit with status 0, not 1, on receiving an EOF character, since it's not a error condition. MFC after: 1 week
* Fix a typo (missed &&).sobomax2003-01-201-1/+1
| | | | Submitted by: marcus
* Add a new gettytab(5) option - `pl', which if set tells getty that the linesobomax2003-01-191-3/+3
| | | | | | | | | | in question is PPP-only line, i.e. no PPP-sequence detection is necessary and PPP login program referenced by `pp' should be started automatically instead of login(1) Feature suggested and sponsored by: United Networks of Ukraine No reply from: re MFC after: 2 weeks
* #include <sys/time.h> instead of depending on namespace pollution inbde2002-02-251-3/+3
| | | | | | <sys/stat.h> for its prerequisite <sys/time.h>. Removed a duplicated include. Sorted includes.
* Remove some unused variables, mark unused parameters as unused and changeimp2002-02-061-13/+12
| | | | | names of variables that shadow globally declared variables. This should help people doing later WARNS= fixes.
* o __P removalimp2002-02-061-47/+32
| | | | | o remove register o use strict prototypes
* Add 'df' string to gettytab - the strftime(3) format for %dyar2001-06-071-1/+1
| | | | | | in the banner messages (of course, defaults to "%+"). Submitted by: Gleb Smirnoff <glebius@tak.estra.ru>
* Check return code from login_tty. Allow getty to try and becomejwd2000-11-191-1/+12
| | | | | | | a daemon and session leader (thus allowing getty to be run from a shell command line or script). Partially Reviewed by: bde
* Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and therebywollman2000-10-101-0/+1
| | | | <time.h>).
* Add 'nc' flag to gettytab -- no carrier. Forces non-blocking open andnsayer2000-07-311-2/+3
| | | | | | | setting of CLOCAL. Necessary for 3 wire RS-232 setups with dumb terminals. PR: 5959
* Changed setflags() to set_flags(). This fixes world breakage due tobde2000-01-281-3/+3
| | | | recently incremented namespace pollution in <unistd.h>.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Ensure that things returned by gethostname() andbrian1999-04-071-2/+3
| | | | | | | | | | friends are terminated and allow for a maximum host name length of MAXHOSTNAMELEN - 1. Put parenthesis around sizeof args. Make some variables static. Fix telnetd -u (broken by my last commit) Prompted by: bde
* Add an 'al' (autologin username) capability to getty/gettytab. This is apeter1999-04-041-4/+21
| | | | | | | | | | damn useful thing for using with serial consoles in clusters etc or secure console locations. Using a custom gettytab entry for console with an entry like 'al=root' means that there is *always* a root login ready on the console. This should replace hacks like those which go with conserver etc. (This is a loaded gun, watch out for those feet!) Submitted by: "Andrew J. Korty" <ajk@purdue.edu>
* Set the CPU resource limit back to infinity before exec()ing PP.brian1999-03-091-1/+4
| | | | PR: 10399
* This thing has its own puts function, so use it.jkh1998-10-081-1/+3
| | | | Submitted by: Matthew Jacob <mjacob@nas.nasa.gov>
* Correct incompletes .Xrs. Remove duplicate #includes and unused variables.charnier1997-11-211-9/+10
|
* Removed unused variables.alex1997-06-271-4/+1
|
* Reset alarm before invoking ppplogin.davidn1997-06-031-1/+3
| | | | | | | PR: 3733 Reviewed by: Submitted by: kfurge@worldnet.att.net Obtained from:
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Tidy-up modem-chat handling: ensure tty modes are restored todavidn1997-02-091-10/+17
| | | | | | | | | 'sane' standard (not raw) settings before abort/exiting; move responsibility of setting raw mode for chat-handling out of chat.c to avoid doing redundant tc{s,g}etattr()s; move DE pause prior setting standard mode before issue/login prompt to avoid echoing modem connect strings. Fixed up comment styles in a couple of places.
* Increased username size to allow passing username:auth_method todavidn1997-02-071-1/+1
| | | | login.
* Make username size dependant on MAXLOGNAME in sys/param.h. Wasdavidn1997-02-021-2/+2
| | | | | | previously hard-coded at 16 characters (and possibly overflowing the field when NUL terminating a username of exactly 16 characters in length).
* Added:davidn1997-02-021-50/+183
| | | | | | | | | | | | ic=expect/send script modem init script ac=expect/send script modem answer script ct#val chat script timeout (seconds) rt#val recycle timeout (seconds) if 'ac' set dc#val debug bitmask for debugging chat scripts hw (boolean) enable crtscts handshaking if=path 'issue' file sent prior login prompt chat.c is a simplistic expect/send chat module.
* Fix bug in %s, %m, %r and %v macros not displaying data.davidn1997-02-021-1/+5
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Add a new 'de' capability, specifying a number of seconds to sleep beforemsmith1996-12-311-1/+7
| | | | | | | | | | | | | emitting the initial prompt. This is useful in a number of circumstances : - you have (a) stupid modem(s) that assert(s) DCD too soon. - you have dialin users with stupid diallers and poorly written chatscripts. (esp. some Winsock diallers) BSD/OS also has this capability. Submitted by: damian@cablenet.net (Damian Hamill)
* Add the >optional< ability to sense PPP link bringups and call an ↵pst1996-11-131-4/+49
| | | | authentication program
* Replace non-POSIX speed setting by POSIX oneache1996-05-071-2/+3
|
* Finally commit the changes that make getty(8) no longer depend on thejoerg1996-05-051-117/+183
| | | | | | | | | | | | COMPAT_43 cruft. This is supposedly the last core utility that has been using it! (So now, one should be able to remove this option from the config files. Be aware that the last officially released xterm however still requires it.) The getty has been running now for several weeks on my modem line, so i feel safe about it. Obtained from: mostly from the NetBSD vendor-branch
* Back this change out. It's just not worth arguing over and any further emailsjkh1995-08-031-27/+1
| | | | | | I get on this topic will go straight to /dev/null. This is absolutely the last word on this topic you'll see from me. Too much time has already been wasted.
* A useful aid.. Add support for:jkh1995-08-011-1/+27
| | | | | | | | %r: current release %m: machine architecture type (i386 for now) %s: OS name (FreeBSD) from uname() in banner string.
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* Fix from John Kohl:dg1994-09-181-1/+1
| | | | | | | /usr/libexec/getty doesn't properly interpret the '%d' escape. It tries to use %P to get AM or PM, but instead all it gets is "P". Submitted by: John Kohl
* Ignore SIGQUITs, cause getty dumps core on garbadge from modem lineache1994-08-291-1/+1
|
* Replace this with the 1.1.5.1 getty. David says that the 4.4 version is toojkh1994-08-261-113/+63
| | | | | broken to live. Submitted by: jkh
* Implement fbtab ala SunSO.guido1994-08-221-1/+4
| | | | | | Could not compile it (on thud) because ttychar.h was still broken. Reviewed by: Submitted by: guido
* BSD 4.4 Lite Libexec Sourcesrgrimes1994-05-271-0/+549
OpenPOWER on IntegriCloud