MFC r343479: Fix potential buffer overflow and undefined behavior.The buffer allocated in read_chat() could be 1 element too short, if thechatstr parameter passed in is 1 or 3 charachters long (e.
MFC r343479: Fix potential buffer overflow and undefined behavior.The buffer allocated in read_chat() could be 1 element too short, if thechatstr 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 terminatingNULL 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 thechar pointer before it is assigned to the results array.
show more ...
Move gettytab to libexec/getty/Approved by: re (gjb), will (mentor)Differential Revision: https://reviews.freebsd.org/D16953
Remove pointless comment.MFC after: 2 weeksSponsored by: DARPA, AFRL
.Xr pam_securetty(8) from ttys(5), to hint the users as to what actuallyenforces the 'secure' tty flag.MFC after: 2 weeksSponsored by: DARPA, AFRL
.Xr pstat(8), so that people have a chance to learn how to get a listof terminal devices using "pstat -t".MFC after: 2 weeksSponsored by: The FreeBSD Foundation
Fix gettytab(5) to document f0, f1, and f2 as unsupported; they've been gonesince r131091.PR: 184691 (partial)Submitted by: naddy@MFC after: 2 weeksSponsored by: The FreeBS
Fix gettytab(5) to document f0, f1, and f2 as unsupported; they've been gonesince r131091.PR: 184691 (partial)Submitted by: naddy@MFC after: 2 weeksSponsored by: The FreeBSD Foundation
Prevent getty(8) from looping indefinitely if the device node doesn'texist. This behaviour makes no sense for eg USB serial adapters, orUSB device-side serial templates.This mostly reverts to pre
Prevent getty(8) from looping indefinitely if the device node doesn'texist. This behaviour makes no sense for eg USB serial adapters, orUSB device-side serial templates.This mostly reverts to pre-r135941 behaviour.Reviewed by: imp@Sponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D14198
Build getty(8) with WARNS=6.Reviewed by: imp@MFC after: 2 weeksSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D14197
Sprinkle static; avoid nested externs.MFC after: 2 weeksSponsored by: The FreeBSD Foundation
Add missing initializer.MFC after: 2 weeksSponsored by: The FreeBSD Foundation
Rename getty's getline() to get_line(), to avoid clash with getline(3).Obtained from: DragonFlyBSDMFC after: 2 weeksSponsored by: The FreeBSD Foundation
Don't cast away the const, it's not been needed since r92925.MFC after: 2 weeksSponsored by: The FreeBSD Foundation
Initialize all the fields. This is one of the steps required to bump WARNS.MFC after: 2 weeksSponsored by: The FreeBSD Foundation
Reduce code duplication; no functional changes.Obtained from: NetBSDMFC after: 2 weeksSponsored by: The FreeBSD Foundation
Remove unused variable.MFC after: 2 weeksSponsored by: The FreeBSD Foundation
General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier f
General further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat 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 ofHighlander" tool: an older (2014) run over FreeBSD tree was useful as astarting point.
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Add a new getty/gettytab capability to generate an initial message dynamically.This modification adds a new gettytab(5) option (iM) to specify aprogram to run that will generate the initial (banne
Add a new getty/gettytab capability to generate an initial message dynamically.This modification adds a new gettytab(5) option (iM) to specify aprogram to run that will generate the initial (banner) message that isdisplayed before the login prompt. Such a capability is useful whendynamic information is needed in the banner message that cannot besupplied by the set of % substitution sequences available in the "im"option.Reviewed by: vangyzen, wblock, manpagesApproved by: vangyzen (mentor)MFC after: 1 weekRelnotes: yesSponsored by: Dell EMCDifferential Revision: https://reviews.freebsd.org/D12108
Fix markup in gettytab(5).Reviewed by: baptMFC after: 2 weeksSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D10476
Impelemnt ttys onifexists in init.Implement a new init(8) option in /etc/ttys. If this option is presenton the entry in /etc/ttys, the entry will be active if and only if itexists. If the name s
Impelemnt ttys onifexists in init.Implement a new init(8) option in /etc/ttys. If this option is presenton the entry in /etc/ttys, the entry will be active if and only if itexists. If the name starts with a '/', it will be considered anabsolute 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 systemconsole). Likewise with serial ports.It differs from onifconsole in only requiring the device exist ratherthan it be listed as one of the system consoles.Sponsored by: NetflixDifferential Revision: https://reviews.freebsd.org/D10037
Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8)There is one capability explicitly documented in gettytab(5) as stupid: he.And it is indeed. It was meant to facilitate sys
Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8)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 extendedregular expression which is matched against the hostname. If there are noparenthesized subexpressions in the pattern, entire matched string is usedas 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 actuallyuseful (e.g., it is now possible to obtain node or domain names from theoriginal hostname string, without knowing it in advance).Reviewed by: jilles, manpages (wblock)Approved by: jilles (implied)Differential Revision: https://reviews.freebsd.org/D9244
Missing tab.Pointed out by: bapt
getty(8): Undo incomplete support VEOL2 and VSTATUS.Forgot to add some definitions for charnames[].
getty(8): Support VEOL2 and VSTATUSBring some type cleanups while here.Obtained from: NetBSD
getty(8): Use poll(2) and nanosleep(2) instead of select(2).Sort headers while here.Obtained from: NetBSD (CVS Rev. 1.25 - 1.26)
123456