delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/02/24/09:39:30

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EAA83858294
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1708785568;
bh=6bbzcZHeBtB2dPLmBly9ZwTnn4sCzWui9NS/N/RWi6U=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=CH/xN6NQyI473c44cFgphvetwOC0TV3ED85XghHNp3D+AzuePOqR3kPQ/4RBdqLQs
BteiAQBKZe73NFuAI+7aAhgP/mtmMd95oqNmrFuliW/h/ntLxOeLPt8o87RrSy0hun
26Wohp1VH8GwCXR9dbaih9ye7P+4G7QfnsyIQnpc=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 350283858D1E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 350283858D1E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708785513; cv=none;
b=RMAcevH6sowKMfDYKRqhepj+PCH3BJWICyKIn1EMIFT3VaBQuRJDYscjQPMC0/BpBNppr70z6TLJ/4SNfwZMkyghxKM+7vRRg/+a0U0kRD+nx6/fxpFNup3gqFLs5+N5qcZkdzMvckuyGTC7YhNRcQsOyX0Ep2TuCT/r59u1EAk=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1708785513; c=relaxed/simple;
bh=zTfe7w6pHcCKjXJx3POcJbzFoJXN7vIfUQjw1aMawTE=;
h=MIME-Version:From:Date:Message-ID:Subject:To;
b=ZoXjUplcEkHj79n7IVp2S5Rs8+mJUR3OwTebpFJTGyCbbqjufv4uy/AXSGveMhz/mWTZ2mO7lNoNRCwClu+ohXF17+0Uv3ahvsFoeAPKdEs9NqOJNsceeprE7lzwGL0uZwy9ujggS8YEEmraYX4gt4UY0iwlWlpYWRn057v4b4M=
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=1708785511; x=1709390311;
h=content-transfer-encoding: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=ru4AYvC/yVvkAvxPhRKjfwjLrgeiTVFsscT/9XNg1/U=;
b=UDOTXvqG+TFVkFmmvQkQMT3kDUO8PiUx2HOOsbcX6YjDXC5Exn5O8MQjt9nVVw8qf+
XNJtjhfsOhGkEn15e36GnV3aru+0kJsxcn8AX+T6siFxkHgUStutLTOghTdEu8tpJkIW
bLExnXEoei7mAtlL99GC6qxDnGe9URxkMS65VsVWis3CqblD7dYwTFaVdBWuRBXP92Oq
Gj7v4iKdcVbxmhcO0kThHgyx8Xk2bAY8LxnDIR6dRVSNLZqna3yPcrluOh7nhbeUTeZ8
9ESda00f+92oVYGEHxazf2Vv+VOATvbqAzk3NoaD82TkR3ZtcV9kNjnuBXYJqOoiz2zY
PZ5w==
X-Gm-Message-State: AOJu0YwSLz7c9BMffQ0zwJuWh8J9M3UNafwnP8hYojK8h5RixClvJ+e8
W/qQf6iMsiljoUjjxb1n0brWq/fk93sN+XVPKIVfGQFni/bhtYdr1hFerIkB9JNx9Eaz3fFpdAb
TD4LD63fqgHxoomxywLO5Vpu6A9bKy3gsPXU=
X-Google-Smtp-Source: AGHT+IGC6xQtWwzuhIrmzMhdGI5f3IUQvQtuTl6ikzNKTDd29TYoldgm++yAdRIxTKn+AFueW5FcOEZQixgNgBae8vw=
X-Received: by 2002:a6b:5a11:0:b0:7c7:6f8:c653 with SMTP id
o17-20020a6b5a11000000b007c706f8c653mr3253715iob.2.1708785510967; Sat, 24 Feb
2024 06:38:30 -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>
In-Reply-To: <ZdecXZNUgQ3i0hYN@calimero.vinschen.de>
Date: Sat, 24 Feb 2024 15:38:05 +0100
Message-ID: <CAKAoaQk39bKbG0a_sZAR2KKz5f4U04xc=499YibfbdLesxC4Vg@mail.gmail.com>
Subject: Will all SIDs fit into |SECURITY_MAX_SID_SIZE| bytes ? / was: Re:
Switching groups with newgrp - how to get the new group with
|GetTokenInformation()| ?
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,
FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,
KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,
SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no 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: Roland Mainz via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Roland Mainz <roland DOT mainz AT nrubsig DOT org>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 41OEdUsd028704

On Thu, Feb 22, 2024 at 8:11 PM Corinna Vinschen via Cygwin
<cygwin AT cygwin DOT com> wrote:
> On Feb 22 18:38, Roland Mainz via Cygwin wrote:
> > If I switch the current user's group with /usr/bin/newgrp, how can a
> > (native) Win32 process use
> > |GetTokenInformation(GetCurrentThreadToken(), ...)| to find out which
> > group is the new "current group" (e.g. which |TokenInformationClass|
> > should I use) ?
>
>   PSID sidbuf = (PSID) alloca (SECURITY_MAX_SID_SIZE);
[snip]

Win32/NT API question: All known SIDs will fit into
|SECURITY_MAX_SID_SIZE| bytes, right ? I'm asking because right now
the ms-nfs41-client code assumes that all SIDs use a variable amount
of memory, and we always have to ask the Win32/NT API about the number
of bytes to allocate. If |SECURITY_MAX_SID_SIZE| is the global maximum
limit for all Windows versions, then we could simplify the code a
lot...

----

Bye,
Roland
-- 
  __ .  . __
 (o.\ \/ /.o) roland DOT mainz AT nrubsig DOT org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

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