mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fuse: Ignore extra options parameter on macOS
macOS macfuse has an extra options parameter for the setxattr and getxattr FUSE callbacks. The possible options are documented below. However the underlying libguestfs APIs don't allow us to act on these flags, so we ignore them for now. (from https://manp.gs/mac/2/setxattr) XATTR_NOFOLLOW do not follow symbolic links. setxattr() normally sets attributes on the target of path if it is a symbolic link. With this option, setxattr() will act on the link itself. XATTR_NOFOLLOW_ANY do not follow any symbolic links encountered during pathname resolution. An error is returned if a symlink is encountered before the last component of path. XATTR_CREATE fail if the named attribute already exists. XATTR_REPLACE fail if the named attribute does not exist. Failure to specify XATTR_REPLACE or XATTR_CREATE allows creation and replacement. Reported-by: Mohamed Akram Fixes: https://github.com/libguestfs/libguestfs/issues/180 Related: https://github.com/macfuse/macfuse/issues/1065
This commit is contained in:
committed by
rwmjones
parent
84e15e784f
commit
63a2ed92b4
12
lib/fuse.c
12
lib/fuse.c
@@ -753,7 +753,11 @@ mount_local_fsync (const char *path, int isdatasync,
|
||||
|
||||
static int
|
||||
mount_local_setxattr (const char *path, const char *name, const char *value,
|
||||
size_t size, int flags)
|
||||
size_t size, int flags
|
||||
#ifdef __APPLE__
|
||||
, uint32_t extra_apple_options_ignored
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int r;
|
||||
DECL_G ();
|
||||
@@ -777,7 +781,11 @@ mount_local_setxattr (const char *path, const char *name, const char *value,
|
||||
*/
|
||||
static int
|
||||
mount_local_getxattr (const char *path, const char *name, char *value,
|
||||
size_t size)
|
||||
size_t size
|
||||
#ifdef __APPLE__
|
||||
, uint32_t extra_apple_options_ignored
|
||||
#endif
|
||||
)
|
||||
{
|
||||
const struct guestfs_xattr_list *xattrs;
|
||||
int free_attrs = 0;
|
||||
|
||||
Reference in New Issue
Block a user