From owner-svn-src-all@freebsd.org Thu Feb 2 21:56:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54D49CCED75; Thu, 2 Feb 2017 21:56:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CB34ECA; Thu, 2 Feb 2017 21:56:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22b.google.com with SMTP id v23so2663602qtb.0; Thu, 02 Feb 2017 13:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=11jmnfDdnn5OGT0bx4mDVnHy9RUUpiYYYMBoA8eC3bA=; b=J8DH9sSwYrE0dTBKsggGq9AlpHqq/RJjJg+wZaw5w+0KVaio3qBz9feEXsR8q3Ysa4 RuSf3s6OTlGWy2jbrm+hg8CrT2JmsTbYtpE99Eh7aooaAtKLhKPWPL1PoViHEnCjLeOR nLEmFd295nJa4GFzRhW0KVzOQRDyGX4urGwQ/azqtwh3nFuqzddKW3uqBFoFWXCpxu0Q CfkLVgXG9FbuKGTAXKiTrER/x+TuJBMRzIWF38AaGRCxJLTcS+LYTn7Hp5C+1fBtw+qH CMqvRm6rZC0mFcunztySdzwUFB8CK6udqO4rUzkiVnLh4qpqqs79ENIHX98yyLDfYcRz O+iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=11jmnfDdnn5OGT0bx4mDVnHy9RUUpiYYYMBoA8eC3bA=; b=g9/g0BLoQLTj5YDZjLap0ntukQxDdYHFXs0q4iC1vhXtNOYDxnm8DRhH7V6OSUXthU 3eOlmvs/2PYxsN9C/4nyNXADxC/VAgCpqtTuzog9seSS7cYvSzt029JoN7qtdWZ80FTE uTYuCUOHecpzcP4eOOcM2JGgLYEXzzQ7Gim1b5eeaDamjeZAX/5bJzS1OnrxDaZ4hB5n tgScRp0B2rEPCKZxWTVVQ7v7qHaSDq6nBjqBK7O9bOq4BoGdmZxH/HTzPD+rKn4j6uUs 5qmdJjmhAmACjaJKsIix7QwzwSy+AeYkNtWLHuAcWLKDl8SomovqpEngY/ov3Gvx0o2n f9nQ== X-Gm-Message-State: AIkVDXI3prNKZ33qt8ceKaRYlQg5QpRhDq8RWnEkBn8tWYkmY2UG/p3AbxjdYEhxDX2jKOcnXFvzdhKXkiyiDQ== X-Received: by 10.200.36.207 with SMTP id t15mr10485955qtt.84.1486072592924; Thu, 02 Feb 2017 13:56:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Thu, 2 Feb 2017 13:56:32 -0800 (PST) In-Reply-To: <201702022030.v12KUoxk072619@repo.freebsd.org> References: <201702022030.v12KUoxk072619@repo.freebsd.org> From: Ngie Cooper Date: Thu, 2 Feb 2017 13:56:32 -0800 Message-ID: Subject: Re: svn commit: r313107 - head/libexec/getty To: Alexey Dokuchaev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 21:56:34 -0000 On Thu, Feb 2, 2017 at 12:30 PM, Alexey Dokuchaev 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