For example, on xattr-supporting filesystems like ext4 and XFS with user 
namespaces, I executed the following commands:

```shell
mkdir testdata
touch testdata/a
tar --format=pax --pax-option=SCHILY.xattr.user.gxattr=gvalue -cf testdata.tar 
testdata
rm -rf testdata
tar -xvf testdata.tar --xattrs
getfattr -d -m ".*" testdata
getfattr -d -m ".*" testdata/a
```

Expected both `testdata` and `testdata/a` to have the *user.gxattr="gvalue"* 
key-value pair, as per the specification stating that Global header  
content should be used when keys exist in the Global header but are  
absent from Extended headers.

Notably, the pattern should actually be treated as keyword, while keyword 
should serve as pattern. This is because the `locate_handler` function uses the 
`keyword` field in *xhdr_tab* to perform prefix matching against input 
parameters (named "keyword") when selecting *xhdr_tab* entries.

Therefore, I confirm this modification is correct based on:

1. Passing unit tests
2. Pattern is the actual keyword
3. Resolving the global header default value issue



------------------ ???????? ------------------
??????: "Sergey Poznyakoff"<g...@gnu.org.ua&gt;; 
????????: 2025??5??8??(??????) ????2:53
??????: "xiangjingsi"<xiangjin...@qq.com&gt;; 
????: "bug-tar"<bug-tar@gnu.org&gt;; "xiangjingsi"<xiangjin...@qq.com&gt;; 
????: Re: [PATCH] Author: xiangjingsi<xiangjin...@qq.com&gt;












xiangjin...@qq.com&gt; ha escrit:

&gt; -  t-&gt;decoder (st, t-&gt;keyword, kp-&gt;value, strlen (kp-&gt;value));
&gt; +  t-&gt;decoder (st, kp-&gt;pattern, kp-&gt;value, strlen (kp-&gt;value));

You are trying to use *pattern* as a keyword, which is wrong.&nbsp; What do
you want to achieve?

Regards,
Sergey

Reply via email to