Date: Thu, 2 Feb 2017 13:56:32 -0800 From: Ngie Cooper <yaneurabeya@gmail.com> To: Alexey Dokuchaev <danfe@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r313107 - head/libexec/getty Message-ID: <CAGHfRMAJMJSxnqFFSXKpRKh5ZK8t_XUxvhn09eH3z5myOuXQpQ@mail.gmail.com> In-Reply-To: <201702022030.v12KUoxk072619@repo.freebsd.org> References: <201702022030.v12KUoxk072619@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 2, 2017 at 12:30 PM, Alexey Dokuchaev <danfe@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGHfRMAJMJSxnqFFSXKpRKh5ZK8t_XUxvhn09eH3z5myOuXQpQ>