summaryrefslogtreecommitdiffstats
path: root/src/shared/dissect-image.c
diff options
context:
space:
mode:
authorMoritz Sanft <58110325+msanft@users.noreply.github.com>2024-04-29 13:03:40 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-05-07 09:29:58 +0200
commit34c3d574742e867ef97e79509e4051a82f1b7d9b (patch)
treef616b7e579c95efa9c10b06dd23700e0e8245261 /src/shared/dissect-image.c
parentMerge pull request #32673 from DaanDeMeyer/mkosi (diff)
downloadsystemd-34c3d574742e867ef97e79509e4051a82f1b7d9b.tar.xz
systemd-34c3d574742e867ef97e79509e4051a82f1b7d9b.zip
repart: respect `SOURCE_DATE_EPOCH` on `mkdir_p_root`
This let's systemd-repart respect the `SOURCE_DATE_EPOCH` environment variable when creating directories in the local tree through `CopyFiles` or `MakeDirectories`. To do this, we pass a timestamp `ts` to `mkdir_p_root`, which it will use to fix up `mtime` and `atime` of the directory it creates as well as the `mtime` of the directory it creates the other directory *in*, as the `mtime` of the latter is modified when creating a directory in it. For the same reason, it also needs to fixup the `mtime` of the upper directory when copying a file into it through `CopyFiles`. If `SOURCE_DATE_EPOCH`, times are left as is. (`UTIME_OMIT`)
Diffstat (limited to 'src/shared/dissect-image.c')
-rw-r--r--src/shared/dissect-image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
index cd49276bd3..471e83b074 100644
--- a/src/shared/dissect-image.c
+++ b/src/shared/dissect-image.c
@@ -2008,7 +2008,7 @@ static int mount_partition(
if (where) {
if (directory) {
/* Automatically create missing mount points inside the image, if necessary. */
- r = mkdir_p_root(where, directory, uid_shift, (gid_t) uid_shift, 0755, NULL);
+ r = mkdir_p_root(where, directory, uid_shift, (gid_t) uid_shift, 0755);
if (r < 0 && r != -EROFS)
return r;