delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/29/09:43:33

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Tue, 29 May 2012 15:42:50 +0200
Message-ID: <CANs8wdCCMC6R5Pzye67KJ2Oie728J7eq52kXd1Mh56Bn5ivS+Q@mail.gmail.com>
Subject: [cron-config] Possible issue with administrators group ?
From: AZ 9901 <az9901 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Hello,

I am looking at the /bin/cron-config script.

Line 627, we can find :
elif net localgroup "${_admingroup}" | grep -Eiq "^${username}.?$"; then

Why .? at the end of the regexp ? "^${username}.?$"

We could have problems if for example we already have "user1" in
administrators group, and cron user is "user2".
"user2" would then not be added to the administrators group.

Do we have some buggy output from "net localgroup" on some Windows
versions to use .? at the end of the regexp ?

On my Windows XP, using grep -iq "^${username}$" works perfectly.
What about other Windows versions ?

Thank you very much !

Best regards,

Ben

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

- Raw text -


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