delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/12/05/13:49:07

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5B5In6OB1417791
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5B5In6OB1417791
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=VO9EMCQK
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3F9F4C515F0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1764960545;
bh=itnBj3jSTLKHu9I6crgQLRKdf9NT0shQAlJAjrui0LI=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=VO9EMCQK1eYD/DW1BlZUdxDIdF4F9jrzU90QlzqWZ8HyWww7tDPyuHfqj2Z7dQAv8
e+96KPUYkkZm54H2bfpgHdoLl/fVeuUeet8AY5M8r/o82+s/rQL/qog+f7ZtOmPNCm
md9FFiGsm4zn+5+5ua+UgM/MVwYVCVYpcYbr82sI=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1EBF4C3189B
Date: Fri, 5 Dec 2025 19:48:48 +0100
To: cygwin AT cygwin DOT com
Subject: Re: group '545' does not exist ?
Message-ID: <aTMpECmWwfXmUE7Q@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <3a9f1d9a-d363-4617-bc24-e2b5aa4d27e9 AT gmail DOT com>
<CAKAoaQntTmvE8EbKCiJMcySrhHG91a947A8WTvKkv3H6LzhsHg AT mail DOT gmail DOT com>
<48e6fb4c-2341-4f43-b158-d70a9b391f91 AT gmail DOT com>
<de6f8c31-2e4d-48e3-af61-6e6a2b640f79 AT dronecode DOT org DOT uk>
<a3be4a15-ff9b-4056-9982-b991eed1a430 AT SystematicSW DOT ab DOT ca>
<89866400-5131-4790-aa55-542e451ab197 AT gmail DOT com>
<aTLSsHtxB_8ssxWU AT calimero DOT vinschen DOT de>
<aTMkqp9bwoz7E0-X AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <aTMkqp9bwoz7E0-X@calimero.vinschen.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 5B5In6OB1417791

On Dec  5 19:30, Corinna Vinschen via Cygwin wrote:
> On Dec  5 13:40, Corinna Vinschen via Cygwin wrote:
> > On Dec  5 09:28, Marco Atzeri via Cygwin wrote:
> > > On 04/12/2025 21:50, Brian Inglis via Cygwin wrote:
> > > > On 2025-12-04 08:00, Jon Turney via Cygwin wrote:
> > > > > Actually, I think this is a shortcoming of the cygwin version of newgrp.
> > > > > The SUS description [1] of newgrp allows a numeric group id to be
> > > > > specified.
> > > > > (In fact, it includes the clarifying remark "If group is a non-
> > > > > negative numeric string and exists in the group database as a group
> > > > > name, the numeric group ID associated with that group name will be
> > > > > used as the group ID", which suggests a, um, straightforward
> > > > > implementation)
> > > > > But it seems that our implementation only currently handles a group
> > > > > name (See [2]).
> > > > > [1] https://pubs.opengroup.org/onlinepubs/7908799/xcu/newgrp.html
> > > > 
> > > > That's OG SUSV2 1997 - current is at:
> > > > 
> > > >      https://pubs.opengroup.org/onlinepubs/9799919799/utilities/newgrp.html
> > > > 
> > > > > [2] https://cygwin.com/cgit/newlib-cygwin/tree/winsup/utils/newgrp.c#n166
> > 
> > Shouldn't be too hard to add to our newgrp(1).
> 
> Uhm... there's a problem here.
> 
> Right now, our newgrp is commandline compatible with Linux' newgrp from
> shadow-utils:
> 
> - A single '-' reinitializes the environment.
> - The group must be given as name, not as GID.
> 
> This is not commandline compatible with the POSIX definition:
> 
> - A '-l' reinitializes the environment.
> - The group may be given as name or GID.
> 
> I can't just change it to POSIX compatible because this potentially
> breaks Linux compatibility.
> 
> What we could do is to check the POSIXLY_CORRECT environment variable
> and switch the identity to POSIX if this variable is set.
> 
> Make sense?

No, scratch that, it's much eaiser.  shadow-utils newgrp let's -l slip
through, any other -X results in a usage message.  I can change Cygwin's
newgrp accordingly.

The only non-compatibility is that Cygwin's newgrp allows to specify a
command.   shadow-utils nad POSIX newgrp only create a new shell
environment.

I guess we can ignore this...


Corinna

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

- Raw text -


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