From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by sourceware.org (Postfix) with ESMTPS id 906403857006 for ; Mon, 13 Nov 2023 20:41:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 906403857006 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nrubsig.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 906403857006 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.166.51 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699908110; cv=none; b=FSkSPqLLifVIezzfAkic/tyoDB47vh/4Bl8zUvG9DXPHNml5S9Svm4bHYrmWRiEaA1BjU2TTBtaZOCpzi7kxrLle3tPZcnacthFaTEj2JcKz3gD/YJrFhdWcBU1sgeaE7d2d/Xj44ztyJJ0rJlxCoewGJne3NrSlQ4JtgCIuxuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699908110; c=relaxed/simple; bh=PgBbrDmf1q1luM4c5lFrY0CSHell5UWwUZXDKFMTtkE=; h=MIME-Version:From:Date:Message-ID:Subject:To; b=rfO2g6RJdfCaq57SfnCdY7cFDn2g7fEJYKlhOlRKxx6+Gac/NtKAiMVrC90Fon6WNIzzQsGw8WiceoLJVOjw/Yp7ziNK/vaK9Ahm3wp89MOCmIEsBrq3N9FAx3BHX2WUZ2JGpjREMnxIN+OnQxH7jJEJSJUXzlNrm04WWzuBNdE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7a692658181so187165839f.1 for ; Mon, 13 Nov 2023 12:41:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699908107; x=1700512907; 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=WP/dDp3gsAyrX7d30Q1hFuYzhfOdRW30XHbVOSoVfyI=; b=Vsgn9uRfQSJmPswvNHYMfS8gM9fgpWfdXIbYV4Udijt06QakWKixqHbzp847rg7Dhk GChVVqzBtDxhHUlY/CuGGWfLL4YKFtdPzLyY4M/EdmKeibxfBdfNKmal80mXwYsvs/ZY +PBCpJxyPHNWZZLqxM/19TzbGaVJNXMiQdGRcKHyiFqjXZQeM7AIraP2TlUCt1ylH8wW fkBOqBp3iQX21oXCdZDr0eH1jB/GHKNhJpW5uVlK2KhVMMLaZsxPcbB3C7tDcmTS0/XS JKPQfMiC3avNAXkZgy/UUvVEJPY2bQbE74YLEnewOykbFUI5Ut0jZQJ1FKncIrVG7Kva +zSw== X-Gm-Message-State: AOJu0YyFtwOcmoZQhA8t180T85Zzi2fQuPMINUuhrb9kWeCoISNL5h7P DkJh01jCYlE9t7YUHkOgX6NokuAAtw2HG3clxxxA2/xwI9E= X-Google-Smtp-Source: AGHT+IGqVkk/IdZftYhCwTNSyLpHUBeDMqf14xPmVx62M+vI/8NbHjijJEl0Ac4Hu9yw+J5RZyIRdZkScPUYiVAkuSA= X-Received: by 2002:a05:6e02:1d96:b0:359:4199:1fe2 with SMTP id h22-20020a056e021d9600b0035941991fe2mr12100914ila.8.1699908107514; Mon, 13 Nov 2023 12:41:47 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Roland Mainz Date: Mon, 13 Nov 2023 21:41:21 +0100 Message-ID: Subject: Re: Cygwin 3.5 mapping uid/gid on NFSv4 filesystem to unexpected IDs ... To: cygwin-developers@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 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 List-Id: On Mon, Nov 13, 2023 at 8:39=E2=80=AFPM Corinna Vinschen wrote: > > On Nov 10 13:22, Roland Mainz wrote: > > On Tue, Oct 31, 2023 at 5:20=E2=80=AFPM Roland Mainz wrote: > > > > > > Is the Cygwin behaviour (i.e. mapping of NFS3Attr uid/gid to differen= t > > > uid/gid in Cygwin $ ls -n #) intended ? > > > > In the meantime I tried this: > > ---- snip ---- > > # Map NFSv4 uid/gid 1:1 to Cygwin uid/gid - does not work > > regtool -i set '/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/N= TDS/trustPosixOffset' > > 0x0 > > regtool -i set '/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/N= etlogon/Parameters/trustPosixOffset' > > 0x0 > > ---- snip ---- > > This can't work. trustPosixOffset is not a value in the registry. It's > stored in AD only and fetched from the domain's system container via > LDAP. > > uid/gid mapping between NFS server and Cygwin works by utilizing the NFS > client's identity mapping as described in > https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nfs OK... ... note that this is our new NFSv4.1 driver for Windows, not the Microsoft NFSv3 driver which comes with Windows (10) itself. > If this doesn't fit your needs, you have to overload what's given to you > by maintaining this info via /etc/passwd and /etc/group entries. OK, I'll try to do some digging from there... Another question: In the original email I send this output: ---- snip ---- $ ls -la total 1386 drwxr-xr-x 5 Unix_User+197608 Unix_Group+197121 120 Oct 31 11:53 . drwxrwxrwt 3 Unix_User+0 Unix_Group+0 60 Oct 27 17:36 .. drwxr-xr-x 14 Unix_User+197608 Unix_Group+197121 3660 Oct 31 05:16 bash drwxr-xr-x 2 Unix_User+197608 Unix_Group+197121 60 Oct 30 12:46 junctiontest1 drwxr-xr-x 3 Unix_User+197608 Unix_Group+197121 80 Oct 31 11:54 ksh -rwxr-xr-x 1 Unix_User+197608 Unix_Group+197121 1411059 Oct 30 13:05 xxx $ ls -lan total 1386 drwxr-xr-x 5 4278387688 4278387201 120 Oct 31 11:53 . drwxrwxrwt 3 4278190080 4278190080 60 Oct 27 17:36 .. drwxr-xr-x 14 4278387688 4278387201 3660 Oct 31 05:16 bash drwxr-xr-x 2 4278387688 4278387201 60 Oct 30 12:46 junctiontest1 drwxr-xr-x 3 4278387688 4278387201 80 Oct 31 11:54 ksh -rwxr-xr-x 1 4278387688 4278387201 1411059 Oct 30 13:05 xxx ---- snip ---- username "Unix_User+197608" in this case gets the numeric Cygwin uid=3D=3D'4278387688', while the expected uid would be '197608' (what the NFSv4.1 driver sets in the Nfsv3Attr API). Little bit playing around inthe Cygwin shell gives me $ bash -c 'echo $((4278387688 - 0xFF000000))' # which prints the expected "197608" ... ... where in the Cygwin codebase is 0xFF000000 applied to the uid from the NFSv4.1 driver - and WHY ? ---- Bye, Roland --=20 __ . . __ (o.\ \/ /.o) roland.mainz@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /=3D=3D\ O\ TEL +49 641 3992797 (;O/ \/ \O;)