Date: Mon, 4 Sep 2023 16:03:54 +0200 From: Felix Palmen <zirias@freebsd.org> To: current@freebsd.org Cc: dchagin@freebsd.org Subject: Re: Possible issue with linux xattr support? Message-ID: <52go6mhpf34em7x7llzh7dgtf7ggdd7n2wuofm2yrndiw73yqk@pgngyvdypvhd> In-Reply-To: <xehacpkc3uc3cjgkybj26snod2d76hfuoz2qnhsjectxtojvhx@ytzoek66ksz5> References: <ZO409dM4Ws7x_yuM@heemeyer.club> <g5lcvxsnjppbfchdtiufwxcbx7au2dbv2wkxwf5pqp66mo547b@vouujjivkgox> <ZO8EfRnfbF4ixn_L@heemeyer.club> <wp767un2xqnfmmox7uxrl3arrr3mzhccze7okk6zcmc4qnr2xj@kgjyjpezyfy6> <ZO8KaKBwliVeGdVG@heemeyer.club> <l5vgnwjddobhl5h2vceafhdo5uyqznaih7se7rk7bilwzqjpax@5ucptcralggq> <ZO8ea5sXCEKYimr1@heemeyer.club> <hwugmejws4sihu2gi4ccqi34cplyq6dfctkhkb6crnuivz65pz@sbr6og3znxlv> <ZO8iWGOWcM9x8FOR@heemeyer.club> <xehacpkc3uc3cjgkybj26snod2d76hfuoz2qnhsjectxtojvhx@ytzoek66ksz5>
next in thread | previous in thread | raw e-mail | index | archive | help
--ygr3ndkcrikak3m7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Felix Palmen <zirias@freebsd.org> [20230904 15:39]: > For some reason (I still have to try to get more information about it, > will do soon), something else is broken now. While install from GNU > coreutils works fine, some build systems use 'cp -p' to install files > instead, which now fails with: >=20 > | cp: preserving permissions for [...]: Operation not permitted The issue seems to be with listing attributes: | root@15-default:/wrkdirs/usr/ports/x11/linuxsrc-libxcb/work/libxcb-1.15/d= oc # truss /compat/linux/bin/cp -pR ./tutorial '/wrkdirs/usr/ports/x11/linu= xsrc-libxcb/work/stage/compat/linux/usr/share/doc/libxcb/' 2>&1 | grep xattr | linux_flistxattr(0x4,0x0,0x0) ERR#-1 'Operation not pe= rmitted' | linux_flistxattr(0x4,0x0,0x0) ERR#-1 'Operation not pe= rmitted' | linux_llistxattr(0xffffffffcdd9,0x0,0x0) ERR#-1 'Operation not pe= rmitted' The following q&d patch makes it work again: #v+ diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index 74b47f1cbaec..0b5af084b1b1 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -198,7 +198,7 @@ listxattr(struct thread *td, struct listxattr_args *arg= s) if (error =3D=3D 0) td->td_retval[0] =3D cnt; free(data, M_LINUX); - return (error_to_xattrerror(attrnamespace, error)); + return (error_to_xattrerror(EXTATTR_NAMESPACE_SYSTEM, error)); } =20 int #v- I think this makes sense, because listxattr iterates over all namespaces, so there's no sane way to know whether the EPERM was caused by trying to access "system" or something else. Cheers, Felix --=20 Felix Palmen <zirias@FreeBSD.org> {private} felix@palmen-it.de -- ports committer -- {web} http://palmen-it.de {pgp public key} http://palmen-it.de/pub.txt {pgp fingerprint} 6936 13D5 5BBF 4837 B212 3ACC 54AD E006 9879 F231 --ygr3ndkcrikak3m7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iNUEABYKAH0WIQRpNhPVW79IN7ISOsxUreAGmHnyMQUCZPXjyl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0Njkz NjEzRDU1QkJGNDgzN0IyMTIzQUNDNTRBREUwMDY5ODc5RjIzMQAKCRBUreAGmHny MSPeAP92TH9wbrdHer+D7uaF1/jfOQ134xM+wWuqMZxc0C2t9AEA7OfJuEb7M1OX 5h+IOr6QfOh4gPF09LUvLELOwBy07gc= =LX/D -----END PGP SIGNATURE----- --ygr3ndkcrikak3m7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52go6mhpf34em7x7llzh7dgtf7ggdd7n2wuofm2yrndiw73yqk>