Skip to content

Commit 85c0d32

Browse files
author
Hongzhen Luo
committed
[EROFS] fix the loss of uid and gid
Currently, the uid and gid in the tar file are lost because the `c_uid` and `c_gid` of `erofs_cfg` are not set to -1. This patch fixes it. Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
1 parent 8acf53f commit 85c0d32

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/overlaybd/tar/erofs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include(FetchContent)
33
FetchContent_Declare(
44
erofs-utils
55
GIT_REPOSITORY https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git
6-
GIT_TAG 80156068eb4980342c0ad3ee47ac7261acce5caf
6+
GIT_TAG f457ff1cdbe064dd98418ef64341e518afbc8007
77
)
88

99
FetchContent_MakeAvailable(erofs-utils)

src/overlaybd/tar/erofs/liberofs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ int LibErofs::extract_tar(photon::fs::IFile *source, bool meta_only, bool first_
282282
mkfs_cfg.incremental = !first_layer;
283283
erofs_cfg = erofs_get_configure();
284284
erofs_cfg->c_ovlfs_strip = true;
285+
erofs_cfg->c_uid = -1;
286+
erofs_cfg->c_gid = -1;
285287
if (first_layer)
286288
erofs_cfg->c_root_xattr_isize = EROFS_ROOT_XATTR_SZ;
287289
else

0 commit comments

Comments
 (0)