Re: Selinux patch - for comments



On Tue, 2006-02-28 at 01:56 -0500, Ivan Gyurdiev wrote:
> Hi, this patch adds gnome-vfs support for selinux. It adds the raw 
> selinux context field into the GnomeVfsFileInfo structure.
> It's based on an older patch from Dan Walsh, but with additions to 
> complete it. The read_directory, get_file_info,  
> get_file_info_from_handle, and set_file_info functions were modified, 
> for the file method.
> 
> Patch is posted here for comments. I've done very little testing, so I'm 
> not sure if it works yet. I can tell get_file_info is working (test 
> output is correct, and nautilus displays context fine). I haven't gotten 
> the write interface for nautilus set up yet, so not sure if 
> set_file_info works [ can't see why it wouldn't work, but I need to test 
> this ].

We can't really add this in this cycle, since we're frozen, but this
patch looks mostly ok.

+static int
+get_selinux_context (
+       GnomeVFSFileInfo *info,
+       const char *full_name,
+       GnomeVFSFileInfoOptions options)
+{
+#ifdef HAVE_SELINUX

(and other similar places) has no return value in !HAVE_SELINUX case.

Also, there are some unrelated whitespace changes like:

@@ -1036,7 +1115,7 @@ do_read_directory (GnomeVFSMethod *metho
        if (handle->options & GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS) {
                get_access_info (file_info, full_name);
        }
-       
+
        if (handle->options & GNOME_VFS_FILE_INFO_GET_MIME_TYPE) {
                get_mime_type (file_info, full_name, handle->options, &statbuf);
        }


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a genetically engineered day-dreaming paranormal investigator haunted by 
memories of 'Nam. She's an enchanted punk research scientist from a different 
time and place. They fight crime! 




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