From: Yu Watanabe Date: Thu, 22 Jun 2023 07:12:24 +0000 (+0900) Subject: copy: add one more assertions about copy_flags X-Git-Tag: v254-rc1~119^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dcd407b5e767d43ad1f9de31b36c2632c82cc41f;p=thirdparty%2Fsystemd.git copy: add one more assertions about copy_flags Follow-up for 01428141ba42a06d22f2c0e0df26049e700f4098. --- diff --git a/src/shared/copy.c b/src/shared/copy.c index db26945be8e..5a4a8aaf0d5 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -1133,8 +1133,11 @@ static int fd_copy_tree_generic( copy_progress_path_t progress_path, copy_progress_bytes_t progress_bytes, void *userdata) { + int r; + assert(!FLAGS_SET(copy_flags, COPY_LOCK_BSD)); + if (S_ISDIR(st->st_mode)) return fd_copy_directory(df, from, st, dt, to, original_device, depth_left-1, override_uid, override_gid, copy_flags, denylist, hardlink_context, display_path,