delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/01/12/04:26:21

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 144D3385801C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1705051579;
bh=ywvXGt7woTxa801fzzqA0+p8rc1MRBZVHulLu+kXr2A=;
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=T3j5Ln5PTIkLq5Ylq6Z/0bR7zvs/xoCSVl4rvA6v6qNrNo1vj9PNz8MpLxblsbzMJ
UohE0vRy5RVLsVDHr+/yxG1dS7I2QpsLnf+1fUtiq72eOFgw/NjhPFTNK2a+uppzEb
9/yc8FuEvoB/rtKIP6Tb6G84HrxKpZpluTMTZKvI=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 865DC3858D35
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 865DC3858D35
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705051517; cv=none;
b=OKY6eUePriz9LO+51UTi7Q1HC2BGtpToVciE6j4WxsqhDy1MLhEQm/F2y7dfONvNKmrBoxJXgog6i/wgDOt5PChNe5+ZHy3+uw/2fOXIQdf9LHh5tnCv2Y8uUnPknsjxIJm7X1FMY3dL+f8pvgezcqsyK2z5+3TvLWEABtOV+kg=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1705051517; c=relaxed/simple;
bh=M96ZA8DjEiohvl04mrY4etUpsxKlxd3NbSWVlcdNx3s=;
h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
b=xsKEDGqFOSp3MqCDOl/3bQbjin213mO/aijMkRdPN9ZETsvHoJ2orPFHtGUrOlbnmENoKpMCFvl5GRpAEXLl+Hl+FgKNxvOF1fiDsEKfTbreJyHBPo0BfOjO+5veKV5NFDDKlcgXi0J4lmLCUHDPq1strTFCtampV+AZ5hWNs5M=
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=1705051512; x=1705656312;
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=RDa2/XtnF5a4ArLAXQvQihYVzRVzYMNjsh6N7GbaQ8w=;
b=rIOKcjMCK2h4ZEnnQgZ05gKoKmVxm48ac0psaxpQ5gs2eYkck9Fe4X1Di+6baQrQWB
cEbvy6CIEnK4obF2Oi30Ef9npfJUDJreyKv+ujv13be6FDZkl2bcXdUzOGn2l6oo8phS
f5AYZwxP8deWdpjL4HGAuQ380G8wuV4vxMdLURgQPaeZ/LDBh0qmIh120102bs9zEWHI
xkbU/Eyvkl9c6s77sMidNczleZzNeP7bZ3vMRNKxeyECCgna0RqcsI6h7FOd7fJ7lHer
1oWoBNY6mU6dSWN5Npqsgzgh+zzfZ8M7GnAVVL/yv5YctR8p0CZ9mM5d9DT5KUue03XX
0yfA==
X-Gm-Message-State: AOJu0Yzm1BCiL0oNVEsCNQbjCPBzwQ1rvyZV3H3N33TPV4csvpIQWCfj
CWRBQlxk4Gsjw+2ng+iYnl8vK5JOvu3PaQMqimmNXtaS
X-Google-Smtp-Source: AGHT+IGj8YyGEGVIiq5DPb2TXcs+pnpvIU9hPJEbMYMPtMPvnveZNYCdw25e61S2uVYbxuwiYk6QuHWftUhSj2sXdyE=
X-Received: by 2002:a05:6402:2284:b0:554:e4e:ba38 with SMTP id
cw4-20020a056402228400b005540e4eba38mr463940edb.17.1705051512517; Fri, 12 Jan
2024 01:25:12 -0800 (PST)
MIME-Version: 1.0
References: <CANH4o6N7UONfYy1ir7WZXpOnthSxF=fcqaPe37dPsdU_AoPoLw AT mail DOT gmail DOT com>
<ZWmsvW0bmko_9Qcc AT calimero DOT vinschen DOT de>
<CANH4o6M7s1h8+atQVdr+uAOgUHKPyomP4zoobvvbW97ebSR=sw AT mail DOT gmail DOT com>
<ZZwCIjfdP6Qh-y5d AT calimero DOT vinschen DOT de>
<CANH4o6NPjo1d-KBxZUo1+tVrZJNcT5ieYX0Hc42ZV0pXLoUtgw AT mail DOT gmail DOT com>
<ZaAaIs7D7DMO4qw3 AT calimero DOT vinschen DOT de>
In-Reply-To: <ZaAaIs7D7DMO4qw3@calimero.vinschen.de>
Date: Fri, 12 Jan 2024 10:24:35 +0100
Message-ID: <CALXu0Ud_iskmHcu_ATU0AJGjFfE-PFyUNwQriLRo6F5dgxPxMA@mail.gmail.com>
Subject: Re: Cygwin tools to read/write NTFS alternate data streams?
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT,
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: Cedric Blancher via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Cedric Blancher <cedric DOT blancher AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 40C9QLDw004144

On Thu, 11 Jan 2024 at 17:41, Corinna Vinschen via Cygwin
<cygwin AT cygwin DOT com> wrote:
>
> On Jan 11 15:00, Martin Wege via Cygwin wrote:
> > On Mon, Jan 8, 2024 at 3:11 PM Corinna Vinschen via Cygwin
> > <cygwin AT cygwin DOT com> wrote:
> > so this is IMO OK.
>
> Yeah, but...
>
> It's not just an open flag, it requires extending functionality of other
> APIs and, for full support, tools, see
> https://docs.oracle.com/cd/E19253-01/816-5175/6mbba7f02/.
>
> It's also rather weird to call alternate data streams "extended
> attributes", because that's just a small part of streams and it's
> already supported via the Linux functions getxattr(2) and friends, see
> https://man7.org/linux/man-pages/man2/getxattr.2.html
>
> > > Apart from that, this sounds like a nice idea for Cygwin 3.6,
> > > provided somebody implements it, https://cygwin.com/acronyms/#SHTDI
> > >
> > > Assuming we can live without actually having a subdir and just
> > > allowing to open and create a file with the O_XATTR flag, it might be
> > > pretty simple to implement.  The path handling code would just have to
> > > drop the colon from the list of characters converted to the private-use
> > > Unicode area.
> > >
> > > Implementing the subdir is a bit more complicated, especially when
> > > taking opendir/readdir of that virtual subdir into account, but it
> > > would certainly be doable.
> >
> > How do other OSes implement the O_XATTR subdir?
>
> IDK.  But there are a few points we have to keep in mind from the
> Solaris man page:
>
> - Given fd is an open file descriptor,
>
>     openat(fd, ".", O_RDONLY|O_XATTR);
>
>   opens the virtual subdir containing the ADS of a file.  It's the
>   only valid way to open the virtual dir.  That's a bit of a relief
>   because it simplifies handling this in openat(2).
>
>     openat(fd, "foo", ...|O_XATTR);
>
>   allows to create or open an ADS for an open file fd.
>
> - unlinkat, renameat, fstatat, fchownat, futimesat and fdopendir need to
>   be made ADS-aware.  They only work on ADS if the fd arg already
>   resolves to an ADS, or if fd is the virtual ADS dir of a file and
>   (except in case of fdopendir) the path argument is the name of an
>   existing ADS.
>
> - pathconf needs to support a new flag XATTR_ENABLED.
>
> This can be made to work given the current fhandler framework in Cygwin,
> but again, https://cygwin.com/acronyms/#SHTDI

bash has cd -@ to enter a virtual dir with XATTRs, if O_XATTR works.

Aside from that, I volunteer with testing of O_XATTR, on demand with 1
or 2 students too.

Still working on testing the cool and new SEEK_HOLE support in Cygwin

Ced
-- 
Cedric Blancher <cedric DOT blancher AT gmail DOT com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

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