DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5B5Cf4dx1290248
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 5B5Cf4dx1290248
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=xP14bseC
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFC0A4CCCA30
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1764938462;
	bh=VugIBHkEtpJXrF2i5pFOH/eDO3yTe18tps9HgxIkiCU=;
	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=xP14bseC4xkFgl5Nei4yYUgX3T4+/axTXbhXVmeKBQngd0Ns+OlqoNEcVRyawUMj3
	 LSjJI3XapUzE4SvG3Yu14vClv3udBXfrP6qY73jELElS9zpCYw/Al01YkveT1cx/K4
	 Pl436dU/iwALS95JNLUF8IzlZIc/EaWpJ1r5LOfg=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 895B84C31890
Date: Fri, 5 Dec 2025 13:40:16 +0100
To: cygwin@cygwin.com
Subject: Re: group '545' does not exist ?
Message-ID: <aTLSsHtxB_8ssxWU@calimero.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <3a9f1d9a-d363-4617-bc24-e2b5aa4d27e9@gmail.com>
 <CAKAoaQntTmvE8EbKCiJMcySrhHG91a947A8WTvKkv3H6LzhsHg@mail.gmail.com>
 <48e6fb4c-2341-4f43-b158-d70a9b391f91@gmail.com>
 <de6f8c31-2e4d-48e3-af61-6e6a2b640f79@dronecode.org.uk>
 <a3be4a15-ff9b-4056-9982-b991eed1a430@SystematicSW.ab.ca>
 <89866400-5131-4790-aa55-542e451ab197@gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <89866400-5131-4790-aa55-542e451ab197@gmail.com>
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Corinna Vinschen <corinna-cygwin@cygwin.com>
Content-Type: text/plain; charset="utf-8"
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 5B5Cf4dx1290248

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).

> Thanks Jon, Brian,
> 
> do you know also why the group in /etc/passwd is ignored and
> "Nobody/Nessuno" is used ?
> 
> $ cat passwd
> Marco:*:197608:545:U-DESKTOP-L2T1NQ9\Utente,S-1-5-21-1151457081-841113255-780074606-1000:/home/Marco:/bin/bash
> 
> $ id
> uid=197608(Marco) gid=197121(NESSUNO)
> groups=197121(NESSUNO),545(Users),4(INTERACTIVE),66049(ACCESSO

This seems to be a bug introduced... let me check... when adding
the newgrp(1) tool in fact.  Looks like this patch disabled the
behaviour.

https://cygwin.com/cgit/newlib-cygwin/commit/?id=dc7b67316d01

I'll debug this later today.  I have to setup a non-domain debugging
environment first...


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

