mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
copy: fix wrong argument passed to S_ISREG() in copy_file_fd_full()
Follow-up for 2f78204498.
This commit is contained in:
committed by
Lennart Poettering
parent
0d67e2b584
commit
43c893e73e
@@ -1214,7 +1214,10 @@ int copy_file_fd_full(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (S_ISREG(fdt)) {
|
||||
/* Make sure to copy file attributes only over if target is a regular
|
||||
* file (so that copying a file to /dev/null won't alter the access
|
||||
* mode/ownership of that device node...) */
|
||||
if (S_ISREG(st.st_mode)) {
|
||||
(void) copy_times(fdf, fdt, copy_flags);
|
||||
(void) copy_xattr(fdf, fdt, copy_flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user