GNU bug report logs - #60620
[PATCH] copy.c: replace set_acl() with chmod_or_fchmod()

Previous Next

Package: coreutils;

Reported by: Ondrej Valousek <ondrej.valousek.xm <at> renesas.com>

Date: Sat, 7 Jan 2023 07:38:02 UTC

Severity: normal

Tags: patch

Full log


Message #23 received at 60620 <at> debbugs.gnu.org (full text, mbox):

From: Ondrej Valousek <ondrej.valousek.xm <at> renesas.com>
To: Pádraig Brady <P <at> draigBrady.com>,
 "60620 <at> debbugs.gnu.org" <60620 <at> debbugs.gnu.org>
Subject: Re: bug#60620: [PATCH] copy.c: replace set_acl() with
 chmod_or_fchmod()
Date: Mon, 9 Jan 2023 06:53:04 +0000
[Message part 1 (text/plain, inline)]
Well, true, I do not know for sure what will happen on different platforms, yes - I can't test.
On Linux both work the same way.
Either case, the purpose of qset_acl() is to set ACLs the way so that it corresponds with the mode argument right?
That's what I would expect how it's supposed to work.
If yes, then isn't it better to handle this task to the filesystem driver in kernel and just call chmod?

Zasláno z Outlooku pro Android<https://aka.ms/AAb9ysg>
________________________________
From: Pádraig Brady <pixelbeat <at> gmail.com> on behalf of Pádraig Brady <P <at> draigBrady.com>
Sent: Sunday, January 8, 2023 10:04:19 PM
To: Ondrej Valousek <ondrej.valousek.xm <at> renesas.com>; 60620 <at> debbugs.gnu.org <60620 <at> debbugs.gnu.org>
Subject: Re: bug#60620: [PATCH] copy.c: replace set_acl() with chmod_or_fchmod()

On 06/01/2023 15:23, Ondrej Valousek wrote:
> This patch replaces set_acl() funclion call with chmod_or_fchmod()
> Both functions works (AFAIK) the same way (at least in Linux) so should be possible.
> Using chmod_or_fchmod would also help us to reduce dependency on libacl
> (see the forthcoming patch to qcopy-acl.c from Gnulib).

The "at least in Linux" qualification worries me.
Having a very quick look at the qset_acl() code suggests
it clears ACLs on some platforms at least,
which chmod_or_fchmod() does not.
Am I reading that wrong?

thanks,
Pádraig
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.