* [Buildroot] [Bug 11216] New: Extended attributes not applied to filesystem
@ 2018-08-10 2:08 bugzilla at busybox.net
2018-10-14 16:42 ` [Buildroot] [Bug 11216] " bugzilla at busybox.net
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2018-08-10 2:08 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=11216
Bug ID: 11216
Summary: Extended attributes not applied to filesystem
Product: buildroot
Version: 2018.05
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: ricardo.martincoski at datacom.com.br
CC: buildroot at uclibc.org
Target Milestone: ---
Steps to reproduce:
1) create a config for squashfs with xattrs added by either a device_table or
_PERMISSIONS in a package.
An example can be seen on the test case of this series:
http://patchwork.ozlabs.org/project/buildroot/list/?series=59394
2) Build
3) Run test, checking with getcap
Actual results:
The build succeeds without any warning.
But in runtime the xattrs are not in the filesystem.
Expected results:
In runtime, calling getcap shows the xattrs.
Additional info:
This bug occurs on master and 2018.05.x. It does not occur on 2018.02.x, before
the use of a per-fs target dir.
makedevs does apply the file capabilities to the $(FS_DIR)/target copy, but the
extended attributes are not propagated to the target filesystem.
Hacks (cumulative) to understand the problem:
1) removing "rm -f $(ROOTFS_COMMON_TAR)" from the main Makefile and inspecting
the tarball
> tvvf rootfs.common.tar --xattrs --xattrs-include='*'
the xattr are not shown.
2) adding "--xattrs --xattrs-include='*'" to ROOTFS_COMMON_TAR_CMD the build
succeeds without any warning. Inspecting the tarball the xattrs show up
> x: 20 security.capability
But when run testing the xattrs are not there.
3) adding "--xattrs --xattrs-include='*'" to ROOTFS_COMMON_UNTAR_CMD the build
succeeds with a warning
> File my_file_with_xattr has unrecognised filetype 0, ignoring
Inspecting the tarball the xattr shows up.
But when run testing the file that should have the xattrs is not in the image.
Additional notes (speculation):
- In its source code, tar has some suspicious workarounds for
security.capability, but it works fine outside of fakeroot.
- fakeroot 1.23 is out but I didn't tried it.
- It looks like the problem occurs when extracting a tarfile with xattrs inside
fakeroot. See below the commands I used to test.
Outside of buildroot I tried using those versions from Ubuntu 18.04:
tar (GNU tar) 1.29
fakeroot version 1.22
> $ mkdir dir
> $ touch dir/file
> $ fakeroot
> # setcap cap_kill+eip dir/file
> # getcap dir/file
> dir/file = cap_kill+eip
> # tar cf archive.tar dir --xattrs
> # exit
> $ tar tvvf archive.tar --xattrs --xattrs-include='*'
> drwxr-xr-x root/root 0 2018-08-05 23:21 dir/
> -rw-r--r--* ricardo/ricardo 0 2018-08-05 23:21 dir/file
> x: 20 security.capability
> $ fakeroot
> # tar xf archive.tar --xattrs --xattrs-include='*'
> # ls -l dir/file
> ?rw-r--r-- 1 root root 0 ago 5 23:21 dir/file
> # file dir/file
> dir/file: ERROR: invalid mode 0644
> # getcap dir/file
> # exit
> $ file dir/file
> dir/file: empty
> $ getcap dir/file
> $ sudo tar xf archive.tar --xattrs --xattrs-include='*'
> $ getcap dir/file
> dir/file = cap_kill+eip
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [Bug 11216] Extended attributes not applied to filesystem
2018-08-10 2:08 [Buildroot] [Bug 11216] New: Extended attributes not applied to filesystem bugzilla at busybox.net
@ 2018-10-14 16:42 ` bugzilla at busybox.net
2018-11-02 10:58 ` bugzilla at busybox.net
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2018-10-14 16:42 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=11216
Yann E. MORIN <yann.morin.1998@free.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at buildroot.uclibc |yann.morin.1998 at free.fr
|.org |
CC| |yann.morin.1998 at free.fr
Status|NEW |ASSIGNED
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [Bug 11216] Extended attributes not applied to filesystem
2018-08-10 2:08 [Buildroot] [Bug 11216] New: Extended attributes not applied to filesystem bugzilla at busybox.net
2018-10-14 16:42 ` [Buildroot] [Bug 11216] " bugzilla at busybox.net
@ 2018-11-02 10:58 ` bugzilla at busybox.net
2018-11-12 17:37 ` bugzilla at busybox.net
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2018-11-02 10:58 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=11216
--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
Yann is proposing this patch series to address this issue:
https://patchwork.ozlabs.org/project/buildroot/list/?series=72842
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [Bug 11216] Extended attributes not applied to filesystem
2018-08-10 2:08 [Buildroot] [Bug 11216] New: Extended attributes not applied to filesystem bugzilla at busybox.net
2018-10-14 16:42 ` [Buildroot] [Bug 11216] " bugzilla at busybox.net
2018-11-02 10:58 ` bugzilla at busybox.net
@ 2018-11-12 17:37 ` bugzilla at busybox.net
2018-11-12 17:39 ` [Buildroot] [Bug 11216] Capabilities " bugzilla at busybox.net
2018-11-13 7:18 ` bugzilla at busybox.net
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2018-11-12 17:37 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=11216
--- Comment #2 from Yann E. MORIN <yann.morin.1998@free.fr> ---
Ricardo, All,
I've sent a second iteration of the series to fix capabilities:
https://patchwork.ozlabs.org/project/buildroot/list/?series=75490
Regards,
Yann E. MORIN.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [Bug 11216] Capabilities not applied to filesystem
2018-08-10 2:08 [Buildroot] [Bug 11216] New: Extended attributes not applied to filesystem bugzilla at busybox.net
` (2 preceding siblings ...)
2018-11-12 17:37 ` bugzilla at busybox.net
@ 2018-11-12 17:39 ` bugzilla at busybox.net
2018-11-13 7:18 ` bugzilla at busybox.net
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2018-11-12 17:39 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=11216
Yann E. MORIN <yann.morin.1998@free.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Extended attributes not |Capabilities not applied to
|applied to filesystem |filesystem
--- Comment #3 from Yann E. MORIN <yann.morin.1998@free.fr> ---
Ricardo, All,
Also, I've edited the title of this BZ, because it really relates
to capabilities. Our makedevs syntax only allows for specifying
capabilities, not arbitrary extended attributes.
Regards,
Yann E. MORIN.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [Bug 11216] Capabilities not applied to filesystem
2018-08-10 2:08 [Buildroot] [Bug 11216] New: Extended attributes not applied to filesystem bugzilla at busybox.net
` (3 preceding siblings ...)
2018-11-12 17:39 ` [Buildroot] [Bug 11216] Capabilities " bugzilla at busybox.net
@ 2018-11-13 7:18 ` bugzilla at busybox.net
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2018-11-13 7:18 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=11216
Yann E. MORIN <yann.morin.1998@free.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Yann E. MORIN <yann.morin.1998@free.fr> ---
Ricardo, All,
Fixed by:
https://git.buildroot.org/buildroot/commit?id=409d4c3fe9949f01b009712a1a731baf597e0f8d
Thanks for the very detailed report! :-)
Regards,
Yann E. MORIN.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-11-13 7:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10 2:08 [Buildroot] [Bug 11216] New: Extended attributes not applied to filesystem bugzilla at busybox.net
2018-10-14 16:42 ` [Buildroot] [Bug 11216] " bugzilla at busybox.net
2018-11-02 10:58 ` bugzilla at busybox.net
2018-11-12 17:37 ` bugzilla at busybox.net
2018-11-12 17:39 ` [Buildroot] [Bug 11216] Capabilities " bugzilla at busybox.net
2018-11-13 7:18 ` bugzilla at busybox.net
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.