aboutsummaryrefslogtreecommitdiff
path: root/libexec/getty
Commit message (Collapse)AuthorAgeFilesLines
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* libexec: Automated cleanup of cdefs and other formattingWarner Losh2023-11-273-7/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-9/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* libexec: Remove ancient SCCS tags.Warner Losh2023-11-2711-24/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* ttys: bump dateWarner Losh2023-10-261-1/+1
|
* ttys: Document insecure flagWarner Losh2023-10-261-2/+3
| | | | | | | | | Both the secure and insecure flag is documented in init(8). the secure flag is documented here; however, the insecure flag is not. Nor is the nuance that a line missing the 'secure' flag is also considered insecure. Document both here. Sponsored by: Netflix
* Purge more stray embedded $FreeBSD$ stringsJohn Baldwin2023-09-252-4/+0
| | | | | | | These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-162-4/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* getty: Avoid NULL deref if stdin is not a tty.Dag-Erling Smørgrav2022-11-041-3/+8
| | | | | | Sponsored by: Klara, Inc. Obtained from: Apple OSS Distributions Differential Revision: https://reviews.freebsd.org/D37265
* getty: code cleanup, part 2Dag-Erling Smørgrav2022-11-044-79/+79
| | | | | | | * Clean up whitespace * Reindent Sponsored by: Klara, Inc.
* getty: code cleanup, part 1Dag-Erling Smørgrav2022-11-045-26/+26
| | | | | | | | | | | | * Avoid unnecessary use of `unsigned char *` * Use explicit casts when assigning `unsigned char *` to `char *` or vice versa * Drop unused global variables (and fix memory leak in `gettable()`) * Use `snprintf()` instead of `strcpy()` + `strcat()` * Drop spurious braces in switch Sponsored by: Klara, Inc. Obtained from: Apple OSS Distributions (in part) Differential Revision: https://reviews.freebsd.org/D37263
* manpages: Remove telnetd referencesBrooks Davis2022-09-291-3/+2
| | | | | | | | | | Mostly remove from the SEE ALSO section, adding a mention of the port where not removed. Elsewhere, remove as appropriate and change from .Xr to .Nm where a mention of telnetd continues to make sense (or removing it would require significant reworking of the surrounding text). Reviewed by: imp, delphij, emaste Differential Revision: https://reviews.freebsd.org/D36785
* pkgbase: Put more binaries/lib in runtimeEmmanuel Vadot2021-12-211-0/+2
| | | | | | | | | Move some needed binaries/libs from FreeBSD-utilities to FreeBSD_runtime. This is everything needed to boot to multiuser with FreeBSD-rc installed. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33435
* libexec/getty/ttys.5: document correct "dialup" flag.Ceri Davies2021-06-011-2/+2
| | | | | | | | This manpage has incorrectly documented the "dialup" keyword as "dialin" since it was first added. Correct that. Approved by: blackend (mentor) MFC after: 12 days
* Revert "getty: push assignment to inner block."Xin LI2021-05-091-2/+2
| | | | | | This reverts commit c7b8bc367f18210d233b0e2185b5ce0d55c9ccaa. Pointed out by: trasz
* getty: push assignment to inner block.Xin LI2021-05-091-2/+2
| | | | | | No functional change. MFC after: 2 weeks
* getty: const'ify search pointer.Xin LI2021-05-091-1/+2
| | | | | | No functional change. MFC after: 2 weeks
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-011-1/+0
| | | | | | | | | | | | | | | Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that. Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so. Notes: svn path=/head/; revision=366304
* getty appears to date from 3rd edition research unix. That's the oldest man pageWarner Losh2020-07-221-2/+2
| | | | | | | | on TUHS and its 'unix 1972' restoration effort has assembler sources that look like simpler version of what's in the 5th edition. Notes: svn path=/head/; revision=363408
* Add cross references betwen ttys(5) and related driversAllan Jude2020-07-111-1/+4
| | | | | | | | | | | | | | nmdm(4), ucom(4), and uart(4) PR: 247638 Submitted by: Pau Amma <pauamma@gundo.com> Reported by: 0mp MFC after: 4 weeks Sponsored by: Klara Inc. Event: July 2020 Bugathon Notes: svn path=/head/; revision=363111
* Simplify code with strlcpy/strlcat.Xin LI2019-12-012-7/+4
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=355260
* Fix potential buffer overflow and undefined behavior.Stefan Eßer2019-01-261-2/+2
| | | | | | | | | | | | | | | | The buffer allocated in read_chat() could be 1 element too short, if the chatstr parameter passed in is 1 or 3 charachters long (e.g. "a" or "a b"). The allocation of the pointer array does not account for the terminating NULL pointer in that case. Overlapping source and destination strings are undefined in strcpy(). Instead of moving a string to the left by one character just increment the char pointer before it is assigned to the results array. MFC after: 2 weeks Notes: svn path=/head/; revision=343479
* Move gettytab to libexec/getty/Brad Davis2018-09-052-0/+240
| | | | | | | | Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16953 Notes: svn path=/head/; revision=338471
* Remove pointless comment.Edward Tomasz Napierala2018-08-031-2/+0
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=337234
* .Xr pam_securetty(8) from ttys(5), to hint the users as to what actuallyEdward Tomasz Napierala2018-08-031-1/+2
| | | | | | | | | | enforces the 'secure' tty flag. MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=337233
* .Xr pstat(8), so that people have a chance to learn how to get a listEdward Tomasz Napierala2018-03-022-4/+6
| | | | | | | | | | of terminal devices using "pstat -t". MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=330277
* Fix gettytab(5) to document f0, f1, and f2 as unsupported; they've been goneEdward Tomasz Napierala2018-02-261-15/+4
| | | | | | | | | | | | since r131091. PR: 184691 (partial) Submitted by: naddy@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=330022
* Prevent getty(8) from looping indefinitely if the device node doesn'tEdward Tomasz Napierala2018-02-251-2/+4
| | | | | | | | | | | | | | exist. This behaviour makes no sense for eg USB serial adapters, or USB device-side serial templates. This mostly reverts to pre-r135941 behaviour. Reviewed by: imp@ Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14198 Notes: svn path=/head/; revision=329992
* Build getty(8) with WARNS=6.Edward Tomasz Napierala2018-02-214-26/+24
| | | | | | | | | | Reviewed by: imp@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14197 Notes: svn path=/head/; revision=329724
* Sprinkle static; avoid nested externs.Edward Tomasz Napierala2018-02-043-16/+16
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=328858
* Add missing initializer.Edward Tomasz Napierala2018-02-041-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=328857
* Rename getty's getline() to get_line(), to avoid clash with getline(3).Edward Tomasz Napierala2018-02-041-3/+3
| | | | | | | | | Obtained from: DragonFlyBSD MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=328856
* Don't cast away the const, it's not been needed since r92925.Edward Tomasz Napierala2018-02-041-4/+4
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=328855
* Initialize all the fields. This is one of the steps required to bump WARNS.Edward Tomasz Napierala2018-02-041-90/+91
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=328846
* Reduce code duplication; no functional changes.Edward Tomasz Napierala2018-02-041-14/+16
| | | | | | | | | Obtained from: NetBSD MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=328843
* Remove unused variable.Edward Tomasz Napierala2018-02-041-1/+0
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=328841
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-206-5/+17
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add a new getty/gettytab capability to generate an initial message dynamically.David Bright2017-09-074-2/+8
| | | | | | | | | | | | | | | | | | | This modification adds a new gettytab(5) option (iM) to specify a program to run that will generate the initial (banner) message that is displayed before the login prompt. Such a capability is useful when dynamic information is needed in the banner message that cannot be supplied by the set of % substitution sequences available in the "im" option. Reviewed by: vangyzen, wblock, manpages Approved by: vangyzen (mentor) MFC after: 1 week Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D12108 Notes: svn path=/head/; revision=323252
* Fix markup in gettytab(5).Edward Tomasz Napierala2017-05-041-36/+36
| | | | | | | | | | Reviewed by: bapt MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10476 Notes: svn path=/head/; revision=317801
* Impelemnt ttys onifexists in init.Warner Losh2017-03-221-1/+7
| | | | | | | | | | | | | | | | | | | | Implement a new init(8) option in /etc/ttys. If this option is present on the entry in /etc/ttys, the entry will be active if and only if it exists. If the name starts with a '/', it will be considered an absolute path. If not, it will be a path relative to /dev. This allows one to turn off video console getty that aren't present (while running a getty on them even when they aren't the system console). Likewise with serial ports. It differs from onifconsole in only requiring the device exist rather than it be listed as one of the system consoles. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D10037 Notes: svn path=/head/; revision=315733
* Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8)Alexey Dokuchaev2017-02-022-52/+48
| | | | | | | | | | | | | | | | | | | | | | | | | There is one capability explicitly documented in gettytab(5) as stupid: he. And it is indeed. It was meant to facilitate system hostname modification, but is hardly usable in practice because it allows very limited editing (e.g., it depends on a particular hostname length, making it non-generic). Replace it with simple implementation that treats ``he'' as POSIX extended regular expression which is matched against the hostname. If there are no parenthesized subexpressions in the pattern, entire matched string is used as the final hostname. Otherwise, use the first matched subexpression. If the pattern does not match, the original hostname is not modified. Using regex(3) gives more freedom, does not complicate the code very much, and makes a lot more sense, in turn making ``he'' less stupid and actually useful (e.g., it is now possible to obtain node or domain names from the original hostname string, without knowing it in advance). Reviewed by: jilles, manpages (wblock) Approved by: jilles (implied) Differential Revision: https://reviews.freebsd.org/D9244 Notes: svn path=/head/; revision=313107
* Missing tab.Pedro F. Giffuni2016-02-271-1/+1
| | | | | | | Pointed out by: bapt Notes: svn path=/head/; revision=296134
* getty(8): Undo incomplete support VEOL2 and VSTATUS.Pedro F. Giffuni2016-02-261-2/+1
| | | | | | | Forgot to add some definitions for charnames[]. Notes: svn path=/head/; revision=296107
* getty(8): Support VEOL2 and VSTATUSPedro F. Giffuni2016-02-261-4/+5
| | | | | | | | | Bring some type cleanups while here. Obtained from: NetBSD Notes: svn path=/head/; revision=296106
* getty(8): Use poll(2) and nanosleep(2) instead of select(2).Pedro F. Giffuni2016-02-261-14/+13
| | | | | | | | | Sort headers while here. Obtained from: NetBSD (CVS Rev. 1.25 - 1.26) Notes: svn path=/head/; revision=296104