[Bug 202192] [PATCH] x11-fm/thunar 1.6.11 change file permissions on sshfs mounted files/dirs
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 28 15:15:09 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202192
--- Comment #4 from rozhuk.im at gmail.com ---
IMHO they dont try build without HAVE_GIO_UNIX: GDesktopAppInfo is part of gio
and hey will get undefined struct/type compiler error.
They patch does not work (without mine) - 100%.
Upstream do many insane and crappy things, I dont want understand why :)
I replace
effective_user_id == g_file_info_get_attribute_uint32 (file->info,
G_FILE_ATTRIBUTE_UNIX_UID)
to
thunar_file_is_writable(file)
All other logic not changed, just refactored to human understanding.
You can use both checks via ||, like:
return (effective_user_id == g_file_info_get_attribute_uint32 (file->info,
G_FILE_ATTRIBUTE_UNIX_UID) || thunar_file_is_writable(file))
May be in some cases there different access levels for file data and metadata
and original code will return TRUE is user is file owner or root.
I dont know what use cases this cover, probably none.
My check is simple: if file writeable than we can write metadata.
This is good for most cases.
I dont know how to allow user write data and restrict write metadata in unix
with chmod().
In my case sshfs mounted to me (simple user), by authorized on remote side as
root.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-xfce
mailing list