Pádraig Brady wrote: > Yes I agree that the change is required. > I've tweaked it so that the geteuid() syscall is only called > if readonly files. Also I removed the error message on chmod failure > as the user will still get an error message _if_ the copy_xattr fails. > Also I ran it through indent and did s/write access rights/write access/. > I'll push it soon if there are no objections.
Thanks for word tweaks and other patch-amending. I spotted one error -
initial value of access_changed was not changed to false when you
changed the name and logic from access_unchanged (fixed by attached
patch).
Greetings,
Ondřej
From a4aee231c48e1cb80e63762fd65b6d09f4936bb2 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <[email protected]> Date: Tue, 15 Sep 2009 08:57:43 +0200 Subject: [PATCH] cp: fix initial value of access_changed variable * src/copy.c (copy_reg): fix initial value of access_changed variable --- src/copy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/copy.c b/src/copy.c index ad2060b..b7d113f 100644 --- a/src/copy.c +++ b/src/copy.c @@ -839,7 +839,7 @@ copy_reg (char const *src_name, char const *dst_name, by xattr_permission() in fs/xattr.c of the GNU/Linux kernel tree. */ if (x->preserve_xattr) { - bool access_changed = true; + bool access_changed = false; if (!(sb.st_mode & S_IWUSR) && geteuid() != 0) access_changed = fchmod_or_lchmod (dest_desc, dst_name, 0600) == 0; -- 1.5.6.1.156.ge903b
signature.asc
Description: Toto je digitálně podepsaná část zprávy
