www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/08/10:13:01

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Herb Maeder <maeder-cygml AT maeder DOT org>
In-reply-to: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com> 's message of Fri, 07 Nov 2008 17:10:02 EST.
Subject: Re: [ANNOUNCEMENT] Updated: OpenSSH-5.1p1-6 (-7)
Date: Sat, 08 Nov 2008 07:12:15 -0800
Message-ID: <8968.1226157135@maeder.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 07 Nov 2008 17:10:02 EST, Christopher Faylor wrote:
> On Fri, Nov 07, 2008 at 01:37:44PM -0800, Herb Maeder wrote:
> >On 07 Nov 2008 12:00:56 +0100, Corinna Vinschen wrote:   
> >> This is a bugfix release which fixes a bug in the ssh-host-config script
> >> which stumbles over user names with a substring of "ssh" in them and
> >> thinks that ssh processes are still running.
> >
> >Is the intent now to catch only processes named 'sshd'?  If so, the
> >current "grep -q 'sshd*$'" may still be a little too loose.  For example, 
> >it could match stuff like "/home/user/flosshdd".  Ok, maybe not likely, 
> >but still it would cause the script to end in an error.
> >
> >Assuming we can depend on "ps -ef" always printing full path names without 
> >any arguments, then "grep -q '/sshd$'" might do the trick.  Is there any
> >reason to catch multiple trailing d's?
> 
> It's possible that Corinna was looking for zero or more d's.
> 
> So, something like grep -qP '/sshd?' would accommodate that.

Yes, that makes sense.  Zero or one was probably the intent.  Thanks for
pointing it out.

Though the trailing $ probably still makes sense to restrict it to
matching only ssh or sshd processes.  grep -qP '/sshd?$'

Herb.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019