summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getttyent.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r260913,266895:nwhitehorn2014-06-081-0/+35
| | | | | | | | | | Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles
* libc: Make various internal file descriptors close-on-exec.jilles2012-12-101-1/+1
| | | | These are obtained via fopen().
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-031-3/+3
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* Remove pseudo-terminals from ttys(5).ed2010-01-271-36/+1
| | | | | | | | | | | | When we had utmp(5), we had to list all the psuedo-terminals in ttys(5) to make ttyslot(3) function properly. Now that pututxline(3) deals with slot allocation internally (not based on TTY names), we don't need to list all the TTYs on the system in ttys(5) to make user accounting work properly. This patch removes all the entries from the /etc/ttys files, but also the pts(4) entries that were appended implicitly, which was added in r154838.
* Fix many "function declaration isn't a prototype" warnings in libc.ed2009-12-051-16/+10
| | | | | I've only fixed code that seems to be written by `us'. There are still many warnings like this present in resolv/, rpc/, stdtime/ and yp/.
* Properly invalidate highest pts number when calling setttyent().ed2009-02-121-5/+4
| | | | | | | | | When calling setttyent() after calling endttyent(), pts_valid will never be set to 1, because the readdir()-loop will likely never vind a pts that has a higher number than before. Simplify the code by removing pts_valid. We'll just set maxpts to -1 when we don't have a valid count yet.
* In getttyent(3), if /etc/ttys doesn't end in a newline, don'tdas2008-01-151-1/+1
| | | | | | | freak out and keep trying to expand the buffer until realloc() fails. PR: 114398
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-091-4/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Remove debug printf.pjd2006-01-261-1/+0
|
* Make getttyent() report what the pts ptys as well.cognet2006-01-261-1/+38
|
* Move initialization above point of first possible reference tomdodd2005-07-251-3/+4
| | | | | | | avoid overwriting ty_status values set from the 'type' field. Previously TTY_DIALUP and TTY_NETWORK flags did not match specified type.
* * Remove __P and convert to ANSI prototypes.obrien2002-02-011-12/+12
| | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
* Add unsigned char cast to isspace argache1999-11-041-2/+4
|
* Fix typo.davidn1997-04-131-1/+1
|
* Implement two new keywords and status flags for entries in /etc/ttys;davidn1997-04-131-3/+42
| | | | | | | TTY_NETWORK (network), TTY_DIALUP (dialup), which determine a basic connection type. TTY_DIALUP in particular will replace the old out of date heuristic "tty[dD]*" in login.c (and better than the current hard-coded method).
* Allow commonly-used "insecure" as a valid keyword in /etc/ttys.davidn1997-02-151-0/+2
| | | | | This prevents keywords after "insecure" occurs being errnoeously parsed as comments.
* Added group= facility to /etc/ttys for tty grouping for moredavidn1997-01-021-0/+3
| | | | | | | | more manageable and convenient referencing by login.conf (login class database) and (e.g.) login.access. This is the first of a group of commits which implements the login class capabilities database.
* Don't free the line buffer, since getttynam(3) might still referencejoerg1996-12-121-5/+4
| | | | | | | | it. Closes PR # bin/2196: Bug in src/libc/gen/gettty... Submitted by: davidn@blaze.net.au (David Nugent)
* Fix a potential memory leak i've introduced with my recent patch.joerg1996-10-211-2/+2
| | | | Reviewed by: bde
* Remove the arbitrary limit for the line length in /etc/ttys, and makejoerg1996-10-191-11/+33
| | | | | | the buffer dynamic. Closes PR # misc/1838: getttyent() arbitrary 100...
* General -Wall warning cleanup, part I.jkh1996-07-121-3/+3
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Don't cast void functions to void.hsu1995-06-201-1/+1
| | | | Obtained from: NetBSD commit by jtc on June 16, 1995.
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+199
OpenPOWER on IntegriCloud