aboutsummaryrefslogtreecommitdiff
path: root/libexec/getty
Commit message (Collapse)AuthorAgeFilesLines
* Purge more stray embedded $FreeBSD$ stringsJohn Baldwin2023-10-242-4/+0
| | | | | | | | | These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957 (cherry picked from commit eba230afba4932f02a1ca44efc797cf7499a5cb0)
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-233-3/+0
| | | | | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b2c76c41be32)
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-233-3/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit d0b2dbfa0ecf)
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-232-4/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in main: (cherry picked from commit 1d386b48a555)
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-233-3/+0
| | | | | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit 42b388439bd3)
* getty: code cleanup, part 1Dag-Erling Smørgrav2022-11-145-104/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 (cherry picked from commit 8ad7a14ab49b93240676e15f404354775be931f4) getty: code cleanup, part 2 * Clean up whitespace * Reindent Sponsored by: Klara, Inc. (cherry picked from commit f285f41498ebe0bfc1dbe47d67af12ec2d131521) getty: Avoid NULL deref if stdin is not a tty. Sponsored by: Klara, Inc. Obtained from: Apple OSS Distributions Differential Revision: https://reviews.freebsd.org/D37265 (cherry picked from commit eb4d86d529e2523a19fd7454976923319954a49d)
* pkgbase: Put more binaries/lib in runtimeEmmanuel Vadot2022-01-051-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 (cherry picked from commit 93c43690960274dd3bb67b1ee0f1dd3ca4d13def)
* 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
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-16/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-191-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge headSimon J. Gerraty2014-04-289-53/+19
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | Remove the #ifdef DEBUG code, which is not compilable on 64bitKonstantin Belousov2015-04-291-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | architectures. It seems to be an overlooked chunk in the r15645. PR: 199767 Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=282245
* | | | Convert to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275077
* | | Remove LOG_ODELAY because it does nothing.Neel Natu2014-08-171-1/+1
| |/ |/| | | | | | | | | | | | | Reviewed by: jilles CR: https://reviews.freebsd.org/D611 Notes: svn path=/head/; revision=270111
* | ttys(5): Pseudo-terminals are not listed and the network keyword is obsolete.Jilles Tjoelker2014-03-091-6/+5
| | | | | | | | Notes: svn path=/head/; revision=262963