History log of /freebsd-10.1-release/lib/libc/gen/getttyent.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 267236 08-Jun-2014 nwhitehorn

MFC r260913,266895:
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


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 244092 10-Dec-2012 jilles

libc: Make various internal file descriptors close-on-exec.

These are obtained via fopen().


# 229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

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.


# 203068 27-Jan-2010 ed

Remove pseudo-terminals from ttys(5).

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.


# 200150 05-Dec-2009 ed

Fix many "function declaration isn't a prototype" warnings in libc.

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/.


# 188536 12-Feb-2009 ed

Properly invalidate highest pts number when calling setttyent().

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.


# 175345 15-Jan-2008 das

In getttyent(3), if /etc/ttys doesn't end in a newline, don't
freak out and keep trying to expand the buffer until realloc()
fails.

PR: 114398


# 165903 08-Jan-2007 imp

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


# 154857 26-Jan-2006 pjd

Remove debug printf.


# 154838 25-Jan-2006 cognet

Make getttyent() report what the pts ptys as well.


# 148401 25-Jul-2005 mdodd

Move initialization above point of first possible reference to
avoid overwriting ty_status values set from the 'type' field.

Previously TTY_DIALUP and TTY_NETWORK flags did not match
specified type.


# 90045 31-Jan-2002 obrien

* Remove __P and convert to ANSI prototypes.
* Remove 'register'. (some functions had 7+ register functions...)
* Fix SCM ID's.


# 52856 04-Nov-1999 ache

Add unsigned char cast to isspace arg


# 24899 13-Apr-1997 davidn

Fix typo.


# 24893 13-Apr-1997 davidn

Implement two new keywords and status flags for entries in /etc/ttys;
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).


# 22734 15-Feb-1997 davidn

Allow commonly-used "insecure" as a valid keyword in /etc/ttys.
This prevents keywords after "insecure" occurs being errnoeously
parsed as comments.


# 21189 02-Jan-1997 davidn

Added group= facility to /etc/ttys for tty grouping for more
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.


# 20383 12-Dec-1996 joerg

Don't free the line buffer, since getttynam(3) might still reference
it.

Closes PR # bin/2196: Bug in src/libc/gen/gettty...

Submitted by: davidn@blaze.net.au (David Nugent)


# 19082 21-Oct-1996 joerg

Fix a potential memory leak i've introduced with my recent patch.

Reviewed by: bde


# 19031 19-Oct-1996 joerg

Remove the arbitrary limit for the line length in /etc/ttys, and make
the buffer dynamic.

Closes PR # misc/1838: getttyent() arbitrary 100...


# 17141 12-Jul-1996 jkh

General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>


# 9272 20-Jun-1995 hsu

Don't cast void functions to void.
Obtained from: NetBSD commit by jtc on June 16, 1995.


# 1574 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.


# 1573 27-May-1994 rgrimes

BSD 4.4 Lite Lib Sources