From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by sourceware.org (Postfix) with ESMTPS id C8CC93858C52; Tue, 5 Mar 2024 22:39:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C8CC93858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C8CC93858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::130 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 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5135ab96dcbso269225e87.1; Tue, 05 Mar 2024 14:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709678352; x=1710283152; darn=cygwin.com; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=idbJekYKg1xW/GrpG0cz5UTbzxvk8HQqLrAU4LbBCkA=; b=gqobJygnn3TpLxGQbiCer+UmgGg3S0BzisI9Xk8ZpsayXcRi9MLbwf6EUDKVsHQdJ+ a9jIgfN0tionUs3Uq66CSMntu1kVEzlkpcAox9z1v0Wvlhk1Gzy7pUY5E8xfocWrdzxb t/GyV5WCZEXmu9gOYP7C2J9+DkbBhf9Hg2+8b5bF0BD4H4Ue4NM235Oe+1z+BI9dlX5h iZ4fROu72xtw53wC6KHOe3J2/danW066EClpV+uvJXnByiNJQ2+ZyHN465l17GUr7tQ7 A4MZ9Wh2440URs/V4cGodWaeTeb2fBxhkcaPMWm4y9Fxa+KnNvWK+IIYZvT+czkSr1Gr 165A== 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: In-Reply-To: From: Dan Shelton Date: Tue, 5 Mar 2024 23:38:00 +0100 Message-ID: Subject: Re: Switching groups with newgrp - how to get the new group with |GetTokenInformation()| ? To: cygwin@cygwin.com Cc: Corinna Vinschen Content-Type: text/plain; charset="UTF-8" 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 List-Id: On Sat, 24 Feb 2024 at 14:11, Corinna Vinschen via Cygwin 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