svn commit: r313107 - head/libexec/getty
Ngie Cooper
yaneurabeya at gmail.com
Thu Feb 2 21:56:34 UTC 2017
On Thu, Feb 2, 2017 at 12:30 PM, Alexey Dokuchaev <danfe at freebsd.org> wrote:
> Author: danfe (ports committer)
> Date: Thu Feb 2 20:30:50 2017
> New Revision: 313107
> URL: https://svnweb.freebsd.org/changeset/base/313107
>
> Log:
> 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).
>
> Reviewed by: jilles, manpages (wblock)
> Approved by: jilles (implied)
> Differential Revision: https://reviews.freebsd.org/D9244
Cool! Does this deserve a "Relnotes: yes"?
Thanks!
-Ngie
More information about the svn-src-all
mailing list