mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
Merge pull request #22727 from fbuihuu/journald-preserve-acl-when-rotating
Journald preserve acl when rotating
This commit is contained in:
commit
e9c3312da1
@ -210,7 +210,10 @@ static void managed_journal_file_set_offline_internal(ManagedJournalFile *f) {
|
||||
|
||||
log_debug_errno(r, "Failed to re-enable copy-on-write for %s: %m, rewriting file", f->file->path);
|
||||
|
||||
r = copy_file_atomic(FORMAT_PROC_FD_PATH(f->file->fd), f->file->path, f->file->mode, 0, FS_NOCOW_FL, COPY_REPLACE | COPY_FSYNC | COPY_HOLES);
|
||||
r = copy_file_atomic(FORMAT_PROC_FD_PATH(f->file->fd), f->file->path, f->file->mode,
|
||||
0,
|
||||
FS_NOCOW_FL,
|
||||
COPY_REPLACE | COPY_FSYNC | COPY_HOLES | COPY_ALL_XATTRS);
|
||||
if (r < 0) {
|
||||
log_debug_errno(r, "Failed to rewrite %s: %m", f->file->path);
|
||||
continue;
|
||||
|
@ -1488,7 +1488,7 @@ int copy_xattr(int fdf, int fdt, CopyFlags copy_flags) {
|
||||
NULSTR_FOREACH(p, names) {
|
||||
_cleanup_free_ char *value = NULL;
|
||||
|
||||
if (!(copy_flags & COPY_ALL_XATTRS) && !startswith(p, "user."))
|
||||
if (!FLAGS_SET(copy_flags, COPY_ALL_XATTRS) && !startswith(p, "user."))
|
||||
continue;
|
||||
|
||||
r = fgetxattr_malloc(fdf, p, &value);
|
||||
|
Loading…
Reference in New Issue
Block a user