1
0
mirror of https://github.com/ostreedev/ostree.git synced 2025-01-11 09:18:20 +03:00

deploy: Ignore sockets, fifos in /etc/<subdir> during merge

It's a followup of commit e6a560b407.
We should also ignore sockets and fifos in the subdir of /etc.

Signed-off-by: Yuanhong Peng <yummypeng@linux.alibaba.com>
This commit is contained in:
Yuanhong Peng 2024-01-22 18:03:55 +08:00
parent d1d8f4ab40
commit eb1e9cf768

View File

@ -323,11 +323,20 @@ copy_dir_recurse (int src_parent_dfd, int dest_parent_dfd, const char *name,
}
else
{
if (!glnx_file_copy_at (src_dfd_iter.fd, dent->d_name, &child_stbuf, dest_dfd,
dent->d_name,
sysroot_flags_to_copy_flags (GLNX_FILE_COPY_OVERWRITE, flags),
cancellable, error))
return glnx_prefix_error (error, "Copying %s", dent->d_name);
if (S_ISLNK (child_stbuf.st_mode) || S_ISREG (child_stbuf.st_mode))
{
if (!glnx_file_copy_at (src_dfd_iter.fd, dent->d_name, &child_stbuf, dest_dfd,
dent->d_name,
sysroot_flags_to_copy_flags (GLNX_FILE_COPY_OVERWRITE, flags),
cancellable, error))
return glnx_prefix_error (error, "Copying %s", dent->d_name);
}
else
{
ot_journal_print (LOG_INFO,
"Ignoring non-regular/non-symlink file found during /etc merge: %s",
dent->d_name);
}
}
}