Re: patch to libnautilus-private/nautilus-file.c



On Mon, 2005-03-14 at 05:41 +0100, edoardo wrote:
> hi gals and dudes : )
> 
> i'm new to this list, but i want to type here that i made a patch for 
> libnautilus-private/nautilus-file.c that solves bug #40644. it's a 
> gnome-vfs based bug, but it's got heavy repercussions on nautilus, too. i 
> was advised to post the patch to this list as well as in bugzilla, and 
> since it hasn't been reviewed yet there might be mistakes in it, and i 
> wanted you to have a look at it.
> 
> let me know what you think of it! : )

@@ -708,21 +708,26 @@ nautilus_file_denies_access_permission (
                return FALSE;
        }
 
+       /* check whether the uid is valid. */
+
+       if !(file->details->info->valid_fields &
GNOME_VFS_FILE_INFO_FIELDS_UID) {
+               return TRUE;
+       }


So, if the uid or gid fields are not set all access is denied? Thats not
what the rest of the function defaults to, and i don't think that is
right. If we don't know, we assume we can access the file.

Also, I don't think this is quite the right approach to making this
better. What we're doing here is pushing unix behaviour, including
permission bits and globally used uids to systems where this might not
be right. (For instance, an ftp server might use different uids than the
ftp client.)

I think it would be better if you made nautilus use the
GNOME_VFS_FILE_INFO_FIELDS_ACCESS stuff that was added a while ago. This
lets nautilus automatically understand i.e. kernel-level ACLs, and it
might make it possible to get better permissions behaviour from remote
systems.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a short-sighted small-town grifter with a mysterious suitcase handcuffed 
to his arm. She's a scantily clad blonde Valkyrie with an MBA from Harvard. 
They fight crime! 




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