From c39be58e300db613ace7d8000b3cd83608978c5c Mon Sep 17 00:00:00 2001 From: Otavio Pontes Date: Wed, 8 Apr 2020 14:56:07 -0700 Subject: [PATCH] sys: Preserve permissions and preserve symlinks when copying copy_all() is already doing that and this is important if we try to use copy() for any file in the system root. Signed-off-by: Otavio Pontes --- src/lib/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/sys.c b/src/lib/sys.c index 8ba08174..a78f09c3 100644 --- a/src/lib/sys.c +++ b/src/lib/sys.c @@ -227,7 +227,7 @@ int copy_all(const char *src, const char *dst) int copy(const char *src, const char *dst) { - return run_command_quiet("/bin/cp", src, dst, NULL); + return run_command_quiet("/bin/cp", "--preserve=all", "--no-dereference", src, dst, NULL); } int mkdir_p(const char *dir)