linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* SELinux labels not defined
@ 2021-10-02 22:50 David Michael
  2021-10-03  4:38 ` Gao Xiang
  2021-10-04  3:59 ` [PATCH] Add erofs as a SELinux capable file system Gao Xiang
  0 siblings, 2 replies; 9+ messages in thread
From: David Michael @ 2021-10-02 22:50 UTC (permalink / raw)
  To: linux-erofs

Hi,

I tried to make an SELinux-labeled EROFS image, and the image itself
seems to contain the labels from a hex dump, but the mounted files are
all unlabeled:

# ls -lZ xml
total 8
drwxr-xr-x. 2 root root unconfined_u:object_r:var_t:s0         4096 Sep 29 21:43 dbus-1
drwxr-xr-x. 2 root root unconfined_u:object_r:fonts_cache_t:s0 4096 Sep 29 22:19 fontconfig
# mkfs.erofs test.img xml
mkfs.erofs 1.3-g4e183568-dirty
	c_version:           [1.3-g4e183568-dirty]
	c_dbg_lvl:           [       2]
	c_dry_run:           [       0]
# mount -o X-mount.mkdir test.img test
# ls -lZ test
total 8
drwxr-xr-x. 2 root root system_u:object_r:unlabeled_t:s0 78 Oct  2 18:37 dbus-1
drwxr-xr-x. 2 root root system_u:object_r:unlabeled_t:s0 48 Oct  2 18:37 fontconfig

This is running on the current Fedora kernel 5.14.9-200.fc34.x86_64 with
the relevant config options:

CONFIG_EROFS_FS=m
# CONFIG_EROFS_FS_DEBUG is not set
CONFIG_EROFS_FS_XATTR=y
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
CONFIG_EROFS_FS_ZIP=y

I tried the earliest kernel in Fedora 34 (5.11.12-300.fc34.x86_64), and
it also has the same issue.  However, the earliest kernel in Fedora 33
(5.8.15-301.fc33.x86_64) has the correct labels when the image is
mounted.  Is there a problem in the file system driver, or do I need to
do something different for newer kernels?

Thanks.

David

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-09 13:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02 22:50 SELinux labels not defined David Michael
2021-10-03  4:38 ` Gao Xiang
2021-10-04  0:31   ` David Michael
2021-10-04  1:44     ` Gao Xiang
2021-10-04  4:10       ` Gao Xiang
2021-10-09 13:31         ` David Michael
2021-10-09 13:48           ` Gao Xiang
2021-10-04  3:59 ` [PATCH] Add erofs as a SELinux capable file system Gao Xiang
2021-10-05 18:50   ` Chris PeBenito via Linux-erofs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).