bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH] fix NFSv4 acl detection on F39


From: Ondrej Valousek
Subject: RE: [PATCH] fix NFSv4 acl detection on F39
Date: Mon, 15 May 2023 11:50:57 +0000

Hi Paul,

Ok first of all, thanks for taking initiative on this, I am unable to proceed 
on this on my own at the moment.
I see few problems with this:

1. The calculation of the 'listbufsize' is incorrect in your patch. It will 
_not_work as you expected and won't limit the number of syscalls (which is why 
we came up with this patch, right?). Check with my original proposal, we really 
need to check for 'system.nfs4' xattr name presence here
2. It mistakenly detects an ACL presence on files which do not have any ACL on 
NFSv4 filesystem. Digging further it seems that kernel in F39 behaves 
differently to the previous kernels:

F38: 
# getfattr -m . /path_to_nfs4_file
# file: path_to_nfs4_file
system.nfs4_acl                                    <---- only single xattr 
detected

F39:
# getfattr -m . /path_to_nfs4_file
# file: path_to_nfs4_file
system.nfs4_acl
system.posix_acl_default
/* SOMETIMES even shows this */
system.posix_acl_default

Now I faintly recall there was an activity in to move POSIX acls calculation 
from userspace to kernel (now Jeff in CC will hopefully clarify this), but it 
seems to me that presence of the system.posix* attributes no longer signals the 
presence of the actual ACLs, so our code thinks that POSIX acls are present 
instead (which makes no sense on NFSv4).

Ondrej

-----Original Message-----
From: Paul Eggert <eggert@cs.ucla.edu> 
Sent: pátek 12. května 2023 21:27
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org; Ondrej Valousek <ondrej.valousek.xm@renesas.com>
Subject: Re: [PATCH] fix NFSv4 acl detection on F39

Oops, that patch has a bug in the rare case where the stack buffer isn't large 
enough: it might access freed storage. Fixed by installing the attached further 
patch.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]