[Libguestfs] access function in fuse_operations (concerns libguestfs)

Daniel Haid d.haid at gogi.tv
Mon Oct 14 19:25:59 UTC 2019


Hello,

libguestfs has a guestmount command that basically gives access via fuse 
to filesystem images. It also takes options for fuse.

When -o default_permissions is not given, the mounting user should have 
full access to everything (he will have access to the image anyway). Of 
course, it should also be possible to give -o default_permissions to 
have the kernel check the permissions, which could be useful for some 
use cases.

Now the strange thing is that the guestmount command implements the 
access function in fuse_operations. This results in the following bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1761563

I have been asked to ask here for clarification on certain points:

1) If the above behaviour is wanted (no access checks without "-o 
default_permissions"; the expected checks by the kernel if the option is 
given), what is the right way to implement it? Can the access function 
be just omitted?

2) If so, in which use cases is the access function usually implemented? 
Do I understand correctly that this is only in case some fuse clients 
wants to implement some *own* particular access restrictions (for 
whatever reason) when "-o default_permissions" is *not* given?

3) What could be the case why the access function was implemented in the 
first place? Maybe someone from libguestfs knows this, but it have found

https://www.redhat.com/archives/libguestfs/2014-June/msg00080.html

where some problem is described when there is no access function.

D.H.




More information about the Libguestfs mailing list