delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/03/05/17:39:41

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CA93385843A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1709678379;
bh=cbMwbUkBjJTEvnuDtlulB5zy8RsXtFU8j8mtbBduWvY=;
h=References:In-Reply-To:Date:Subject:To:Cc:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=fbwK0EYQ+0SrzB4n7dXm2l+xvo9lLYKB5KDIR7NgyJ8GiJUk3n5GAqSpJg8rC0rnh
cMK55tHcWAZqsWqMgm8416tk8xT9PX809YnCm+Z66TuK7AyXUAYiTvm9Ifsw6DAAGz
qPuCiTL/pebzSEA9v4Mrr0IGRIfCJ3Wsi3tPocTA=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C8CC93858C52
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C8CC93858C52
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709678355; cv=none;
b=VndCRaHZAXbDyGLyvaYov+Jg+OeEMpOGg+g7caCjF9NWm4JsCwMTAeLPsat5LM+A1pII92oFHKk9G4ZMhapC94H8E5P56z6LYx+p1dSaAlblWZE49Mj1DrzI6kX6R6r17gkFK1cdoo0rYwdO9Bo0+pqo/zVWj8KKQSjBs1oEccQ=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1709678355; c=relaxed/simple;
bh=pEE2erZCuqwLPYJhn6Y2Cfg31exSJE7CQBdHKq0x0Xw=;
h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
b=vhsj3FbN4uHyT30DdH2QXqKRWhPlZs8TCAfZLyfKsCZYMhlJ+ISFkwL7jg3Ight3HCaUgO/r4/eW5EidJyyGJEUmYN41zFWatcC0cQBV0X6oM1ofDLcqqrYmVNGNpQVqpyc4guR3d8iihmDpGxeM40LGBTUlMQ91Z9Kf7Leapog=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1709678352; x=1710283152;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=idbJekYKg1xW/GrpG0cz5UTbzxvk8HQqLrAU4LbBCkA=;
b=agH2sBmSLBER/lcmz1eGHKIDrg4QcryrdrcTiFNkigLByw6qjCBiNhJK2VIc3PCQej
7jvLVscm88HptweJujjvJq8r+n4zqJez0hl/DBJ0HMUqCRliqGytgmM30Vv253aOWshs
mPknWu4EzLss4DcIfAsMTBQ/YRbwT5XlYRfx5klHkfMeu90ivV5CRUShFsjMwsd60PAY
J1pPUqxcYbmqCDXVk7OVnacj1lcfiHa6qmSjP8U5rDViADHWuZh/xEehVLHnwUrOFCJL
5VLSuMt+Xx7KQlhdzU3Z8rjdOyjq7GOz7cDamdq259WsQ8mjEO5I9irsjnlkqnJKjAAw
AvVw==
X-Gm-Message-State: AOJu0YyY/JqbWz6byYBqKOcPePMN8kcU//ND8SQ4wTkcwztjTR191HRZ
vmMmhrSQtxGAoZtB92WAWLI1ZgKSiAO7qjtCINK5b2t9kClAh+f4US2PuzzdCl2ZfnsXCp8AG0n
dSQn0wh0cxFG/yjxXuMQ2BD+vFaPP/63x
X-Google-Smtp-Source: AGHT+IG+GHttyHomu1TwibMgzifNZRZH4EQG69pr0NtJdLHkyfLweiCNbW93oWg3DZBZ92oRWjacywKn2S7jW1eaxrE=
X-Received: by 2002:ac2:5ed9:0:b0:512:d86c:1e2d with SMTP id
d25-20020ac25ed9000000b00512d86c1e2dmr1093786lfq.23.1709678351402; Tue, 05
Mar 2024 14:39:11 -0800 (PST)
MIME-Version: 1.0
References: <CAKAoaQnFxij4Np-jg+bOLEpiSziCfamFrJ2FR_JeO+Sv_Td2Kg AT mail DOT gmail DOT com>
<ZdecXZNUgQ3i0hYN AT calimero DOT vinschen DOT de>
<CAKAoaQ=rCwVHnHAqfd5C3kC45GPE4ZHbbgCWrdM64sojLMuMyA AT mail DOT gmail DOT com>
<Zdi-CnGX3CwWA0nl AT calimero DOT vinschen DOT de>
<CAKAoaQ=kLW3houqanjcN9Qk1++BtgW-dNRiXjLYwCRTYEzoN=w AT mail DOT gmail DOT com>
<CAAvCNcCHAVooYX2_tUHHnUYvWRKHWhBwxmKws7AcqjOo-sQd+g AT mail DOT gmail DOT com>
<Zdnq5yJha75NTpgd AT calimero DOT vinschen DOT de>
In-Reply-To: <Zdnq5yJha75NTpgd@calimero.vinschen.de>
Date: Tue, 5 Mar 2024 23:38:00 +0100
Message-ID: <CAAvCNcAEAr0gFdR_excafHq8+cYjDvf_APb1So-AAWGSu2+zTQ@mail.gmail.com>
Subject: Re: Switching groups with newgrp - how to get the new group with
|GetTokenInformation()| ?
To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
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-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: Dan Shelton via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Dan Shelton <dan DOT f DOT shelton AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Sat, 24 Feb 2024 at 14:11, Corinna Vinschen via Cygwin
<cygwin AT cygwin DOT com> wrote:
>
> On Feb 23 22:15, Dan Shelton via Cygwin wrote:
> > HOWEVER, there is another Cygwin bug:
> > "getent group mywingrp1" does not list any group members, even after
> > "net localgroup mywingrp1 mywinuser44 /add", which is a POSIX
> > violation.
>
> Not a bug.  Two problems:
>
> - Getting members of a group can be an extremly costly operation
>   in a domain or, worse, a domain forest, or even worse, if the
>   domain or domain forest is remote.
>
> - Alonmg the same lines, getting members of a group can be extremly
>   costly in big orgs with thousands of users.  Nobody want's to clutter
>   up space with the list of members in the "Domain Users" group.
>
> - Permissions to enumerate members of a group are restricted.
>   By default only admins and group members are allow to enumerate
>   members and this can be restricted further by domain admins.
>
> Therefore we dropped even trying to populate gr_mem, considering
> that even in its original form on Unix systems, it's used only
> to add supplementary groups.  To do this right on Windows is even
> more costly than blindly enumerating.
>
> It's not a bug, it's a feature :)

Could you add an option to getent so that the full lookup can be
requested via command line, pls? Always editing /etc/nsswitch.conf
forth and back is not a elegant solution, aside from race conditions
with other users on a system

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd

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