delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/02/19/02:12:50

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0770A386187D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1708326768;
bh=aZygKJousEzBeHM8lrgXjNllnlnZ4LvaebEjhPBU5TI=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=FMWXn2NpVNisZTj3uA57rmAUuOfiG7S1Zte1OEns1B8ri69KhUT4aUiNlN/5/jS6r
wybpcyyzJ9PKIu03rBi68W6TkMCEIG5e9m18uef6NVKASKLEANcsi/i667FOwENaND
5ESH+dAPbJECx3CfpRVtAQ0ZHXfrm7uw4xlldSNk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 120AF3860C3E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 120AF3860C3E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708326715; cv=none;
b=pAa9I8f8afSlnGNJapJRfCSTAyJH/dM6JR1FMEVfz08GKXABdcNTftsRYmRSNfhi01dQNO65tgznS7Fd1/UCp7zlaxlkORguQQeL5zBF1w4sO7PVLj0LIBWWdf4rWcd+dr0LaD7lpZbKLw7hFeii2nlS0mh4+SJ65hnqvdQooRg=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1708326715; c=relaxed/simple;
bh=3Lh+SjEqyOIhBXcUhgulXHbLVoUtF/dFpYqneA2qf8U=;
h=MIME-Version:From:Date:Message-ID:Subject:To;
b=bG+M/nzwqz2ZkIpTE5WAm+VY8XfOzaC3VYtc/4Cjee3pVKhaamTn/nvllsGUX9HuntZzeD6r0L0sM0nng79ShqCWHPkT+cKMKWu3z53fwk6JxzrX9rfW3tpVA6vYSmfscPSKr4ysf+eOpqoGfDQMnBPmtqNscL8cTgMpRdC9o/4=
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=1708326713; x=1708931513;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=RAPVYmuutBxIRsbOQeP2TPz0oB1bbFEzu3VDVql2gFk=;
b=DTa5pG0N4cGEZdO1nA6OiWccy6++cGu7hmtSKpO957zPSLThPvSAKXteOe7e19EIwq
eM3fGPhG+Mtruum6PV0X1/j7p8THEnfb6unGoaXL2Mcie7O/Y6zcv1j+t4ClwnHmz2AF
n7uEN3WF9aat7dhEDi2NFO4ktrmODbBAuTU63J+lSqVGcCmSj1NrAX3dFmW4+d6FZEHD
48ddrDuWKDJT47T1ERB5YX3OhGe4w9GzKCgCiGzllBcI/Zggqld0Ud9k9JcnBt4RgekX
VZtDnUpi0BmxhqhOy2nXFzQ4PdGCog+YHtemtbSeDH+3A5GTz+ErGIfCijTN2rKvTFWt
ofEg==
X-Gm-Message-State: AOJu0YyBOViphAGmCwg1O8b6FajGNHrK67LL9YERQ8jXwmlz9g3wbi37
CHpOYfbKlG0qpDm6s4xcVDS3TIhglP1OM+S+qD96Kh1Kv/6T+XVVdW3e3jbsPHVfx3H14A7TT2b
sDqdDoCFl2EVo5ooNmhaSQsSE/NrzMUp8qzE=
X-Google-Smtp-Source: AGHT+IFf7TIoWBZdAmK6K8qWWK7sh/xQh2E/k1w1gmbPfZZ0T1IAlL6Is5h79EMyWptG704NyAHpabEDCyszn/3Bl5M=
X-Received: by 2002:a05:6602:2c95:b0:7c7:44e6:9192 with SMTP id
i21-20020a0566022c9500b007c744e69192mr4589257iow.16.1708326712958; Sun, 18
Feb 2024 23:11:52 -0800 (PST)
MIME-Version: 1.0
Date: Mon, 19 Feb 2024 08:11:00 +0100
Message-ID: <CAKAoaQ=KLBoiDEpCHq2ADc0RoBBYoGbUEUgi6cyMFurX2RoQeg@mail.gmail.com>
Subject: Group name madness: "CurrentSession" vs. "LogonSessionId_0_111590"
vs. "NT AUTHORITY\LogonSessionId_0_111590" ...
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-1.1 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>

Hi!

----

While implementing chown/chgrp support in the ms-nfs41-client (Windows
NFSv4.1 client filesystem driver) I encountered an issue with group
names.

I tried a simple $ chgrp CurrentSession myfile #, which returned
"Permission denied".
OK, /usr/bin/id -a shows that the current user is a member of this
group, so I added a new group called "CurrentSession" to the NFSv4.1
server side ([1]).
But that did not work either, /usr/bin/chgrp # still failed.

Enabling debug output (see https://nrubsig.kpaste.net/ed343a8) I saw
something weird: The filesystem driver gets the group as SID, but
converting this SID back into a Windows Account name (which is used as
NFSv4 group name string) returned "LogonSessionId_0_111590", NOT
"CurrentSession".

1. Why is this happening ? Who or what defines "CurrentSession" ?
2. Why does $ getent group LogonSessionId_0_111590 # not work, even if
this is a legal Windows account name ?
3. $ getent -w group CurrentSession # has "NT
AUTHORITY\LogonSessionId_0_111590" as a field value, but neither
"LogonSessionId_0_111590" nor "NT AUTHORITY\LogonSessionId_0_111590"
return matches when passed to $ getent -w group ... # - is this
intended ?

[1]=Unlike NFSv2/NFSv3 the NFSv4 protocol uses user and group names as
strings, and no longer uses integer values. So usernames and group
names must match, not no longer the |uid_t|/|gid_t| values. That can
be used to avoid |uid_t|/|gid_t| collisions, and allows "identify
mapping", e.g. via a idmapd daemon.

----

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