Skip to content

Commit

Permalink
[EROFS] fix the loss of uid and gid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
salvete committed Dec 3, 2024
1 parent 8acf53f commit 7e7d333
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/overlaybd/tar/erofs/liberofs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ struct erofs_mkfs_cfg {

static int rebuild_src_count;

extern void erofs_init_configure(void);

int erofs_mkfs(struct erofs_mkfs_cfg *mkfs_cfg)
{
int err;
Expand Down Expand Up @@ -280,6 +282,7 @@ int LibErofs::extract_tar(photon::fs::IFile *source, bool meta_only, bool first_
mkfs_cfg.sbi = &sbi;
mkfs_cfg.erofstar = &erofstar;
mkfs_cfg.incremental = !first_layer;
erofs_init_configure();
erofs_cfg = erofs_get_configure();
erofs_cfg->c_ovlfs_strip = true;
if (first_layer)
Expand Down

0 comments on commit 7e7d333

Please sign in to comment.