summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg
diff options
context:
space:
mode:
authordab <dab@FreeBSD.org>2017-09-25 17:39:53 +0000
committerdab <dab@FreeBSD.org>2017-09-25 17:39:53 +0000
commitb3eb1ea10fd5d89b3608acaef0175dbd45fc6a6d (patch)
tree3d2d87e94a9940bf1518c4a9f4d29eb26031b76f /usr.sbin/pkg
parente461c1a1152f0171722f8fbc75644dc6adaa6ffc (diff)
downloadFreeBSD-src-b3eb1ea10fd5d89b3608acaef0175dbd45fc6a6d.zip
FreeBSD-src-b3eb1ea10fd5d89b3608acaef0175dbd45fc6a6d.tar.gz
MFC r313107 (by danfe):
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 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). Approved by: vangyzen (mentor) Sponsored by: Dell EMC
Diffstat (limited to 'usr.sbin/pkg')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud