Commit Graph

160 Commits

Author SHA1 Message Date
Ulrich Spörlein
0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Ed Schouten
88b69f52ee Phase out ttyslot(3).
The ttyslot() function was originally part for SUSv1, marked LEGACY in
SUSv2 and removed later on. This function only makes sense when using
utmp(5), because it was used to determine the offset of the record for
the controlling TTY. It makes little sense to keep it here, because the
new utmpx file format doesn't index based on TTY slots.
2010-01-14 05:35:32 +00:00
Ed Schouten
1100c00131 Make WARNS=6 the default for libexec/.
Just like bin/ and sbin/, I think setting WARNS to the highest value
possible will make it more attractive for people to fix warnings.

- The WARNS variable is set in the Makefile in the directory of the
  application itself, making it more likely that it will be removed out
  of curiosity to see what happens.
- New applications will most likely build with WARNS=6 out of the box,
  because the author would more likely fix the warnings during
  development than lower WARNS.

Unfortunately almost all apps in libexec require a lowered value of
WARNS.
2010-01-02 09:50:19 +00:00
Xin LI
9a0e6be26a Stop mentioning /usr/X11R6.
Approved by:	re (hrs)
2007-07-24 06:41:07 +00:00
Ruslan Ermilov
bfeb5e379c Bump document date on behalf of a recent change.
Approved by:	re (blanket)
2005-06-14 08:40:10 +00:00
Eivind Eklund
d609e438da Fixup of last commit: Use the name X instead of XFree86 for the server binary,
thus being compatible with both XFree86 and X.org.

Noticed by: danfe
2005-05-27 06:07:21 +00:00
Eivind Eklund
ce81b111e6 Make the example for using xterm as a login manager to match the X of the
noughties, not eighties.
2005-05-27 00:39:11 +00:00
Stefan Farfeleder
410f13a58d Include gettytab.h before extern.h so that the declarations of struct
gettyflags, gettynums and gettystrs are available.
2005-04-06 17:42:24 +00:00
Ruslan Ermilov
a3ac07a54e Sort sections. 2005-01-18 09:29:40 +00:00
Warner Losh
780afd18cd Report once that the device isn't there, but keep trying. Don't
filter the errno values.  They don't make as much sense as they used
to given how we do devices in /dev.
2004-09-29 20:55:14 +00:00
Poul-Henning Kamp
be825f30a5 Nuke COMPAT_43 2004-06-25 10:11:28 +00:00
Bruce Evans
2dc8d58f59 Fixed a misspelling of 0 as NULL. 2004-03-14 05:27:26 +00:00
Yaroslav Tykhiy
0183b0b8b8 Prototype defttymode() instead of just declaring it. 2003-07-18 16:25:55 +00:00
Yaroslav Tykhiy
b19ab1ce69 - Use the initial terminal mode instead of the current mode
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
2003-06-18 13:22:44 +00:00
Yaroslav Tykhiy
ec754f0964 Improve the manpage language a bit.
A PPP login program is started _automatically_ (i.e., without
human intervention) even with the "pl" capability unset, as soon
as a PPP frame is detected.  But with "pl" set, a PPP login program
is started independently of the result of PPP detection (which is
rendered unnecessary then,) i.e. _unconditionally_.
2003-06-17 12:29:36 +00:00
Brian Feldman
7ce06101b8 In the last clean-up of this code, the fact that the default tty mode
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().
2003-06-14 08:26:47 +00:00
Yaroslav Tykhiy
3cd7e22936 Read gettytab(5) soon enough to fill in all necessary values.
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
2003-06-10 18:30:41 +00:00
Yaroslav Tykhiy
5f596fa5d0 Spot one more place where boolean variables were incremented
instead of just being assigned a truth value.
2003-06-10 16:34:03 +00:00
Yaroslav Tykhiy
8b52276d10 Coding style fix: Use "foo = 1" instead of "foo++" to assign
the truth value to a boolean variable, especially when inside
a loop.  The variable can overflow otherwise, at least in theory.
2003-06-10 15:38:35 +00:00
Yaroslav Tykhiy
018319c226 Break sentences.
MFC after:	1 week
2003-06-10 15:03:35 +00:00
Yaroslav Tykhiy
cefc03cb09 General mdoc(7) markup fixes:
- Use .Va, not .Em, to mark up variable-like identifiers
  (capability and database entry names.)
- Stop abusing .Tn (trademark) to emphasize general phrases.
- Spot unmarked capability references.
- Add a missing line break.

Discussed with:	ru
MFC after:	1 week
2003-06-10 14:46:43 +00:00
Yaroslav Tykhiy
cc5ded58d3 Improve the language and markup of the description of the pp and pl
capabilities:

- Mark up capability identifiers.
- Don't squeeze much text into the capability table given the options
  will be described below in detail.
- Keep the capability table sorted.
- Use a consistent term for a PPP login program.

MFC after:	1 week
2003-06-10 14:20:38 +00:00
Philippe Charnier
53abf632be The .Xr utility 2003-06-08 12:38:18 +00:00
Yaroslav Tykhiy
f648dfd929 Fix some minor bugs, namely:
- 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
2003-06-06 14:36:41 +00:00
Ruslan Ermilov
af118f2db4 mdoc(7) police: expand contraction. 2003-02-23 01:45:51 +00:00
Maxim Sobolev
0fd652782b Fix a typo (missed &&).
Submitted by:	marcus
2003-01-20 10:33:35 +00:00
Maxim Sobolev
9b76604885 Add a new gettytab(5) option - `pl', which if set tells getty that the line
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
2003-01-19 20:59:52 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Ruslan Ermilov
463cfa804d Fixed the abuses of .Ql visible on stderr in troff mode.
PR:		docs/37176
2002-12-23 16:04:51 +00:00
Ruslan Ermilov
a654c53e16 mdoc(7) police: Removed redundant .Ns calls. 2002-08-13 16:07:28 +00:00
Philippe Charnier
3f162cb85d The .Nm utility 2002-07-06 19:19:48 +00:00
Bruce Evans
e395985f1d #include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for its prerequisite <sys/time.h>.

Removed a duplicated include.  Sorted includes.
2002-02-25 02:30:04 +00:00
Bruce Evans
391a2becf1 Removed unused include of <sys/resource.h> instead of depending on
namespace pollution only 1 layer deep in <sys/stat.h> for its
prerequisite <sys/time.h>

Removed other unused includes.
2002-02-25 02:18:36 +00:00
Warner Losh
0b3356e19e Remove some unused variables, mark unused parameters as unused and change
names of variables that shadow globally declared variables.  This should
help people doing later WARNS= fixes.
2002-02-06 16:47:06 +00:00
Warner Losh
95289b278a o __P removal
o remove register
o use strict prototypes
2002-02-06 16:38:40 +00:00
Kris Kennaway
9357f4121d Lock down with WFORMAT?=1, with overrides in the subdirectories which
are not yet warning-clean.  Tested on i386 and alpha.
2002-02-04 02:33:51 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov
0efe23d669 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 10:49:54 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Yaroslav Tykhiy
db563f3175 Add 'df' string to gettytab - the strftime(3) format for %d
in the banner messages (of course, defaults to "%+").

Submitted by:	Gleb Smirnoff <glebius@tak.estra.ru>
2001-06-07 13:53:23 +00:00
Kris Kennaway
6e76e16fe6 Replace a strcat() with a strlcat(). Partial sync with OpenBSD; more
work is needed.

Submitted by:	"Andrew R. Reiter" <arr@watson.org>
Obtained from:	OpenBSD
2001-04-24 10:33:46 +00:00
Ruslan Ermilov
e5b5c66bca - Backout botched attempt to intoduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:22:12 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ruslan Ermilov
896eb7d10c Prepare for mdoc(7)NG. 2001-01-16 09:15:57 +00:00
Ruslan Ermilov
58eaff2332 Prepare for mdoc(7)NG. 2000-12-20 13:26:01 +00:00
Ruslan Ermilov
760819894e mdoc(7) police: use the new features of the Nm macro. 2000-11-20 14:42:24 +00:00
John W. De Boskey
46ee285632 Check return code from login_tty. Allow getty to try and become
a daemon and session leader (thus allowing getty to be run from
a shell command line or script).

Partially Reviewed by:	bde
2000-11-19 02:10:25 +00:00
Ben Smithurst
76a06f8483 remove trailing periods from SEE ALSO. 2000-11-15 17:27:54 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Garrett Wollman
eb2fc78027 Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).
2000-10-10 01:50:26 +00:00
Nick Sayer
3d4a189e9f Add 'nc' flag to gettytab -- no carrier. Forces non-blocking open and
setting of CLOCAL. Necessary for 3 wire RS-232 setups with dumb
terminals.

PR:		5959
2000-07-31 23:47:57 +00:00
Bruce Evans
21bac31e55 Changed setflags() to set_flags(). This fixes world breakage due to
recently incremented namespace pollution in <unistd.h>.
2000-01-28 07:12:03 +00:00
Sheldon Hearn
f0f4f75620 Correct the ttys.5 and init.8 manpages with respect to the incorrect
assumption that only getty processes can be managed.  Describe the
SysV-like ability to keep arbitrary long-running processes alive
using a non-device first field in /etc/ttys.

PR:		12767
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
1999-12-06 09:07:14 +00:00
Alexey Zelkin
c6d6e7726f Correct spelling : ascii -> ASCII
PR:		docs/13702
Submitted by:	Stephen J. Roznowski <sjr@home.com>
Reviewed by:	mpp
1999-09-20 09:15:23 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Brian Somers
9e9a43bdec Ensure that things returned by gethostname() and
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
1999-04-07 08:27:45 +00:00
Peter Wemm
610b0299af Add an 'al' (autologin username) capability to getty/gettytab. This is a
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>
1999-04-04 04:36:50 +00:00
Brian Somers
23bc058463 Set the CPU resource limit back to infinity before exec()ing PP.
PR:	10399
1999-03-09 22:04:44 +00:00
Jordan K. Hubbard
3a2d923136 This thing has its own puts function, so use it.
Submitted by:	Matthew Jacob <mjacob@nas.nasa.gov>
1998-10-08 23:14:02 +00:00
Poul-Henning Kamp
ee98a93f47 Getty is missing the speed table entry for 230400 baud.
PR:		7280
Reviewed by:	phk
Submitted by:	Craig Leres <leres@ee.lbl.gov>
1998-07-22 05:57:22 +00:00
Poul-Henning Kamp
1499abeef4 Spelling fixes.
PR:		6903
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-10 12:34:27 +00:00
Steve Price
b1dd8a7b57 Clarify use of 'if' capability.
PR:		6499
Submitted by:	Doug Barton <Studded@san.rr.com>
1998-05-04 02:37:29 +00:00
Philippe Charnier
d748864d2c Correct incompletes .Xrs. Remove duplicate #includes and unused variables. 1997-11-21 07:43:53 +00:00
David Nugent
1cc1582825 Fix botch with escaped characters, go back to using cgetstr().
For escaped characters used in modem strings, use double-backslashes
in gettytab.
PR: 4370
1997-09-03 01:05:36 +00:00
David Nugent
b92f6bd2b8 Use cgetustr() since we handled special escapes ourselves.
Fix typo in escape parsing function.
PR: 4370
Submitted by: sumii@is.s.u-tokyo.ac.jp
1997-09-01 10:06:05 +00:00
Steve Price
eb1ca88d07 Turn off hyphenation in this manpage so that .Xr macros, don't get
split between lines.

PR:		bin/4080
1997-08-23 16:22:30 +00:00
Steve Price
f000d0afab .Nm --> .Xr so that gettytab(5) is shown instead of gettytab 5.
PR:		bin/4079
1997-08-17 16:36:41 +00:00
Peter Wemm
65b3003d2d kill the undead 1997-07-13 14:26:00 +00:00
Alexander Langer
b84136c8f6 Removed unused variables. 1997-06-27 21:51:59 +00:00
David Nugent
85f5c8500d Reset alarm before invoking ppplogin.
PR: 3733
Reviewed by:
Submitted by: kfurge@worldnet.att.net
Obtained from:
1997-06-03 12:56:47 +00:00
David Nugent
6bdca427d7 login.group => login.conf.
PR: 3748
Reviewed by:
Submitted by:
Obtained from:
1997-06-02 21:03:20 +00:00
David Nugent
04a59e678a Fix memory leak caused by not freeing memory returned by cgetstr()
calls. The cost is a little more up-front memory allocation, but the
effect seems minimal.

Problem noticed-by: bde

Added syslog at LOG_ERR when referencing an unknown gettytab entry
and for other cgetent() failues (circular reference et al).

To be merged into 2.2 after a few days testing.
1997-05-11 10:25:38 +00:00
David Nugent
d95f252dfe Remove text about unsupported flags 'mdmbuf', 'local', 'crtscts' etc
that are in reality handled in gettytab.

Document the new 'dialin' and 'network' tty flags.
1997-04-13 21:29:50 +00:00
Peter Wemm
9e522f7a18 Revert $FreeBSD$ to $Id$ 1997-02-22 14:22:49 +00:00
David Nugent
26015440b9 Tidy-up modem-chat handling: ensure tty modes are restored to
'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.
1997-02-09 16:12:08 +00:00
David Nugent
c2efe923b5 Increased username size to allow passing username:auth_method to
login.
1997-02-07 11:45:10 +00:00
David Nugent
635b1c4908 Make username size dependant on MAXLOGNAME in sys/param.h. Was
previously hard-coded at 16 characters (and possibly overflowing
the field when NUL terminating a username of exactly 16 characters
in length).
1997-02-02 14:43:32 +00:00
David Nugent
fe552114a3 Added:
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.
1997-02-02 14:24:57 +00:00
David Nugent
e91c4f7cc3 Fix bug in %s, %m, %r and %v macros not displaying data. 1997-02-02 07:38:26 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
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.
1997-01-14 07:20:47 +00:00
Wolfram Schneider
af20215665 Sort cross references. 1997-01-13 00:25:51 +00:00
David Nugent
4ae89ecddd 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.
1997-01-02 08:05:43 +00:00
Mike Smith
b2a1dd44dc Add a new 'de' capability, specifying a number of seconds to sleep before
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)
1996-12-31 01:30:38 +00:00
Mike Pritchard
487990280d Correct some xrefs/mlinks. 1996-12-14 23:27:20 +00:00
Paul Traina
4c640c1689 remove newly added reference to ppplogin 1996-11-13 01:36:52 +00:00
Paul Traina
ee936a69e4 Add the >optional< ability to sense PPP link bringups and call an authentication program 1996-11-13 01:06:40 +00:00
Bruce Evans
9e04d4c7f5 This should have gone away with the COMPAT_43 cruft. cgetent() is now
used instead of the rudimentary routines here.
1996-09-20 11:19:00 +00:00
Mike Pritchard
c0b0bcf4d3 Use the .Bx macro where appropriate. 1996-08-23 20:36:11 +00:00
Andrey A. Chernov
65fe4a53c3 Replace non-POSIX speed setting by POSIX one 1996-05-07 16:42:26 +00:00
Joerg Wunsch
cae66988a1 Finally commit the changes that make getty(8) no longer depend on the
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
1996-05-05 19:01:13 +00:00
Joerg Wunsch
474bf6693a This commit was generated by cvs2svn to compensate for changes in r15249,
which included commits to RCS files with non-trunk default branches.
1996-04-13 15:33:16 +00:00
Joerg Wunsch
712c581c89 Import NetBSD's termios'ed getty into a vendor branch.
Obtained from:	NetBSD 1.1R
1996-04-13 15:33:16 +00:00
Joerg Wunsch
ea5256699d Import the 4.4Lite2 getty into a vendor branch. 1996-04-07 10:28:57 +00:00
Peter Wemm
6065a0be11 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Jordan K. Hubbard
6186bd5dc7 Back this change out. It's just not worth arguing over and any further emails
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.
1995-08-03 05:44:46 +00:00
Jordan K. Hubbard
4d7ccc95b4 A useful aid.. Add support for:
%r:	current release
	%m:	machine architecture type (i386 for now)
	%s:	OS name (FreeBSD)

from uname() in banner string.
1995-08-01 13:12:24 +00:00
Andrey A. Chernov
9aa70e27a7 Change hardcoded 15 (which means 38400) to B115200 which is 17 1995-07-23 02:30:44 +00:00