--- nautilus-2.13.4/src/file-manager/fm-properties-window.c	2006-03-07 15:11:33.728232000 +0000
+++ nautilus-2.13.4-ACLed/src/file-manager/fm-properties-window.c	2006-03-08 14:49:52.967941000 +0000
@@ -3,6 +3,7 @@
 /* fm-properties-window.c - window that lets user modify file properties
 
    Copyright (C) 2000 Eazel, Inc.
+   Copyright (C) 2006 Sun Microsystems
 
    The Gnome Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public License as
@@ -20,6 +21,7 @@
    Boston, MA 02111-1307, USA.
 
    Authors: Darin Adler <darin@bentspoon.com>
+            Alvaro Lopez Ortega <alvaro@sun.com>
 */
 
 #include <config.h>
@@ -84,6 +86,43 @@
 
 #define PREVIEW_IMAGE_WIDTH 96
 
+#define DEFAULT_USER_STR   _("Default user")
+#define DEFAULT_GROUP_STR  _("Default group")
+#define DEFAULT_OTHERS_STR _("Default others")
+#define DEFAULT_MASK_STR   _("Default mask")
+#define MASK_STR           _("Mask")
+
+enum {
+	COL_KIND = 0,
+	COL_ICON,
+	COL_USER,
+	COL_PERM_READ,
+	COL_PERM_WRITE,
+	COL_PERM_EXECUTE,
+	COL_EFFECTIVE,
+	NUM_COLS
+};
+
+enum {
+	COL_USER_ENTRY,
+	COL_NEG_USER_ENTRY,
+	COL_GROUP_ENTRY,
+	COL_NEG_GROUP_ENTRY,
+	NUM_PERM_TYPES
+};
+
+enum {
+	COL_ICON_USER,
+	COL_ICON_NEG_USER,
+	COL_ICON_GROUP,
+	COL_ICON_NEG_GROUP,
+	COL_ICON_MASK,
+	COL_ICON_OTHER,
+	COL_ICON_NEG_OTHER,
+	NUM_COL_ICONS
+};
+
+
 static GHashTable *windows;
 static GHashTable *pending_lists;
 
@@ -119,6 +158,13 @@
 	GList *permission_buttons;
 	GHashTable *initial_permissions;
 
+	GtkWidget *acl_view;
+	GtkWidget *acl_default_view;
+	GHashTable *initial_acl;
+	GdkPixbuf *acl_icons[NUM_COL_ICONS];
+	GtkWidget *acl_buttons;
+	GtkWidget *acl_def_buttons;
+
 	GList *value_fields;
 
 	GList *mime_list;
@@ -1114,6 +1160,204 @@
 }
 
 static void
+update_acl_page_add_entry (FMPropertiesWindow *window, GnomeVFSACL *acl) 
+{
+	GList *ace_list;
+	GList *i;
+	GnomeVFSACE *ace;
+	gboolean  mr,mw,mx;
+	gboolean  imr,imw,imx;
+
+	imr = imw = imx = TRUE;
+
+	/* Read the mask
+	 */
+	ace_list = gnome_vfs_acl_get_ace_list (acl);
+
+	mx = mw = mx = TRUE;
+	for (i=ace_list; i; i=i->next) {
+		ace = i->data;
+		if (gnome_vfs_ace_get_kind (ace) == GNOME_VFS_ACL_MASK) {
+			if (gnome_vfs_ace_get_inherit (ace)) {
+				imr = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_READ);
+				imw = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_WRITE);
+				imx = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_EXECUTE);
+			} else {
+				mr = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_READ);
+				mw = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_WRITE);
+				mx = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_EXECUTE);
+			}
+		}
+	}	
+
+	/* Add the ACL entries
+	 */
+	for (i=ace_list; i; i=i->next) {
+		const char            *id;
+		const GnomeVFSACLPerm *perms;
+		GnomeVFSACLKind        kind;
+		gboolean               inherit;
+		gboolean               negative;
+		gchar                  masked_str[4] = {'-','-','-',0};
+		gboolean               r,w,x;
+		GdkPixbuf              *icon = NULL;		
+
+		GtkTreeIter   iter;
+		GtkTreeModel *model;
+
+		ace      = i->data;
+
+		id       = gnome_vfs_ace_get_id (ace);
+		kind     = gnome_vfs_ace_get_kind (ace);
+		perms    = gnome_vfs_ace_get_perms (ace);
+		inherit  = gnome_vfs_ace_get_inherit (ace);
+		negative = gnome_vfs_ace_get_negative (ace);
+
+		r = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_READ);
+		w = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_WRITE);
+		x = gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_EXECUTE);
+
+		if (inherit) {
+			if (imr & r) masked_str[0] = 'r';	
+			if (imw & w) masked_str[1] = 'w';	
+			if (imx & x) masked_str[2] = 'x';
+		} else {
+			if (mr & r) masked_str[0] = 'r';	
+			if (mw & w) masked_str[1] = 'w';	
+			if (mx & x) masked_str[2] = 'x';
+		}
+
+		if (inherit)
+			model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->details->acl_default_view));  
+		else 
+			model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->details->acl_view));  
+
+		switch (kind) {
+		case GNOME_VFS_ACL_USER:
+			if (inherit && !id)
+				id = DEFAULT_USER_STR;
+
+			if (id != NULL) {
+				icon = window->details->acl_icons[COL_ICON_USER];
+				gtk_list_store_append (model , &iter);
+				gtk_list_store_set (model, &iter, 
+						    COL_ICON, icon,
+						    COL_KIND, kind, 
+						    COL_USER, id,
+						    COL_PERM_READ, r,
+						    COL_PERM_WRITE, w,
+						    COL_PERM_EXECUTE, x,
+						    COL_EFFECTIVE, masked_str,
+						    -1);
+			}
+			break;
+		case GNOME_VFS_ACL_GROUP:
+			if (inherit && !id)
+				id = DEFAULT_GROUP_STR;
+
+			if (id != NULL) {
+				icon = window->details->acl_icons[COL_ICON_GROUP];
+
+				gtk_list_store_append (model , &iter);
+				gtk_list_store_set (model, &iter, 
+						    COL_ICON, icon,
+						    COL_KIND, kind, 
+						    COL_USER, id, 
+						    COL_PERM_READ, r,
+						    COL_PERM_WRITE, w,
+						    COL_PERM_EXECUTE, x,
+						    COL_EFFECTIVE, masked_str,
+						    -1);
+			}
+			break;
+		case GNOME_VFS_ACL_OTHER:
+			if (inherit && !id)
+				id = DEFAULT_OTHERS_STR;
+
+			if (id != NULL) {
+				icon = window->details->acl_icons[COL_ICON_OTHER];
+
+				gtk_list_store_append (model , &iter);
+				gtk_list_store_set (model, &iter, 
+						    COL_ICON, icon,
+						    COL_KIND, kind, 
+						    COL_USER, id, 
+						    COL_PERM_READ, r,
+						    COL_PERM_WRITE, w,
+						    COL_PERM_EXECUTE, x,
+						    COL_EFFECTIVE, masked_str,
+						    -1);
+			}
+			break;
+		case GNOME_VFS_ACL_MASK:
+			id = (inherit) ? DEFAULT_MASK_STR : MASK_STR;
+
+			icon = window->details->acl_icons[COL_ICON_MASK];
+
+			gtk_list_store_append (model , &iter);
+			gtk_list_store_set (model, &iter, 
+					    COL_ICON, icon,
+					    COL_KIND, kind, 
+					    COL_USER, id, 
+					    COL_PERM_READ, r,
+					    COL_PERM_WRITE, w,
+					    COL_PERM_EXECUTE, x,
+					    COL_EFFECTIVE, masked_str,
+					    -1);
+			break;
+		default:
+			g_error ("Unhandled ACE: kind=%d\n", kind);
+			continue;
+		}
+	}
+
+	gnome_vfs_acl_free_ace_list (ace_list);
+}
+
+static void
+update_acl_page (FMPropertiesWindow *window)
+{
+	GtkTreeModel *model;
+	gboolean      can_set_acl;
+	NautilusFile *file = get_target_file (window);
+	
+	can_set_acl = nautilus_file_can_set_acl (file);
+
+	/* Clean it up
+	 */
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->details->acl_view));  
+	gtk_list_store_clear (GTK_LIST_STORE(model));
+
+	gtk_widget_set_sensitive (window->details->acl_buttons, can_set_acl);
+	
+	if (window->details->acl_default_view) {
+		model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->details->acl_default_view));  
+		gtk_list_store_clear (GTK_LIST_STORE(model));
+
+		gtk_widget_set_sensitive (window->details->acl_def_buttons, can_set_acl);
+	}
+
+	/* Fill it out again
+	 */	
+	if (window->details->initial_acl != NULL) {
+		GnomeVFSACL  *acl;
+
+		g_hash_table_remove (window->details->initial_acl, file);
+		acl = nautilus_file_get_acl (file);
+		g_hash_table_insert (window->details->initial_acl, file, acl);
+
+		update_acl_page_add_entry (window, acl);
+
+		/* Update the sentitivity of the lists
+		 */
+		gtk_widget_set_sensitive (window->details->acl_view, can_set_acl);		
+
+		if (window->details->acl_default_view)
+			gtk_widget_set_sensitive (window->details->acl_default_view, can_set_acl);		
+	}
+}
+
+static void
 properties_window_update (FMPropertiesWindow *window, 
 			  GList *files)
 {
@@ -1157,6 +1401,7 @@
 		update_properties_window_icon (GTK_IMAGE (window->details->icon_image));
 
 		update_name_field (window);
+		update_acl_page (window);
 
 		for (l = window->details->emblem_buttons; l != NULL; l = l->next) {
 			emblem_button_update (window, GTK_TOGGLE_BUTTON (l->data));
@@ -1311,6 +1556,18 @@
 	return TRUE;
 }
 
+static gboolean
+file_list_some_directory (GList *file_list)
+{
+	GList *l;
+	for (l = file_list; l != NULL; l = l->next) {
+		if (nautilus_file_is_directory (NAUTILUS_FILE (l->data))) {
+			return TRUE;
+		}
+	}
+	return FALSE;
+}
+
 static void
 value_field_update_internal (GtkLabel *label, 
 			     GList *file_list, 
@@ -2504,6 +2761,26 @@
 }
 
 static void
+acl_change_callback (NautilusFile *file, GnomeVFSResult result, gpointer callback_data)
+{
+	FMPropertiesWindow *window;
+	g_assert (callback_data != NULL);
+
+	window = FM_PROPERTIES_WINDOW (callback_data);
+	if (GTK_WIDGET (window)->window != NULL &&
+	    window->details->long_operation_underway == 1) {
+		/* finished !! */
+		gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL);
+	}
+	window->details->long_operation_underway--;
+	
+	/* Report the error if it's an error. */
+	fm_report_error_setting_permissions (file, result, NULL);
+
+	g_object_unref (window);
+}
+
+static void
 get_initial_permission_state (FMPropertiesWindow *window,
 			      GnomeVFSFilePermissions mask,
 			      GList **on,
@@ -2844,6 +3121,23 @@
 }
 
 static gboolean
+all_can_get_acl (GList *file_list)
+{
+	GList *l;
+	for (l = file_list; l != NULL; l = l->next) {
+		NautilusFile *file;
+		
+		file = NAUTILUS_FILE (l->data);
+		
+		if (!nautilus_file_can_get_acl (file)) {
+			return FALSE;
+		}
+	}
+
+	return TRUE;
+}
+
+static gboolean
 all_can_set_permissions (GList *file_list)
 {
 	GList *l;
@@ -2883,6 +3177,767 @@
 	return ret;
 }
 
+static GHashTable *
+get_initial_acl (GList *file_list)
+{
+	GHashTable *ret;
+	GList *l;
+
+	ret = g_hash_table_new (g_direct_hash,
+				g_direct_equal);
+	
+	for (l = file_list; l != NULL; l = l->next) {
+		GnomeVFSACL *acl;
+		NautilusFile *file;
+		
+		file = NAUTILUS_FILE (l->data);
+		
+		acl = nautilus_file_get_acl (file);
+		g_hash_table_insert (ret, file, acl);
+	}
+
+	return ret;
+}
+
+
+static void        
+ace_perm_toggled_cb (GtkCellRendererToggle *cell_renderer,
+		     gchar                 *path,
+		     gpointer               user_data,
+		     GnomeVFSACLPerm        perm,
+		     gboolean               is_default_acl)
+{
+	GtkTreeIter         iter;
+	GtkTreeModel       *model;
+	FMPropertiesWindow *window = user_data;
+
+	gchar *row_id;
+	gboolean perm_val;
+	GnomeVFSACLKind row_kind;
+	int column;
+
+	GList *file_list, *l;
+
+	/* Look for the row
+	 */
+	if (is_default_acl)
+		model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->details->acl_default_view));  
+	else
+		model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->details->acl_view));  
+
+	gtk_tree_model_get_iter_from_string (model, &iter, path);
+
+	switch (perm) {
+	case GNOME_VFS_ACL_READ:
+		column = COL_PERM_READ;
+		break;
+	case GNOME_VFS_ACL_WRITE:	
+		column = COL_PERM_WRITE;
+		break;
+	case GNOME_VFS_ACL_EXECUTE:
+		column = COL_PERM_EXECUTE;
+		break;
+	}
+
+	/* Update the model
+	 */
+	gtk_tree_model_get (model, &iter, 
+			    COL_USER, &row_id, 
+			    COL_KIND, &row_kind,
+			    column,   &perm_val,
+			    -1);
+
+	perm_val = !perm_val;
+
+	/* Update the files
+	 */
+	file_list = window->details->original_files;
+
+	for (l = file_list; l != NULL; l = l->next) {
+		GnomeVFSACL *acl;
+		NautilusFile *file;
+		GList *ace_list, *i;
+
+		file = NAUTILUS_FILE (l->data);
+		acl = nautilus_file_get_acl (file);
+
+		ace_list = gnome_vfs_acl_get_ace_list (acl);
+		for (i=ace_list; i; i=i->next) {
+			const char            *id;
+			GnomeVFSACE           *ace;
+			const GnomeVFSACLPerm *perms;
+			GnomeVFSACLKind        kind;
+			gboolean               inherit;
+			gboolean               negative;
+			gboolean               default_acl_obj = FALSE;
+
+			ace = i->data;
+
+			id       = gnome_vfs_ace_get_id (ace);
+			kind     = gnome_vfs_ace_get_kind (ace);
+			perms    = gnome_vfs_ace_get_perms (ace);
+			inherit  = gnome_vfs_ace_get_inherit (ace);
+			negative = gnome_vfs_ace_get_negative (ace);
+
+			if ((kind != row_kind) || 
+			    (is_default_acl != inherit))
+				continue;
+
+			if ((id == NULL) && 
+			    ((strcmp (row_id, MASK_STR) == 0)          ||
+			     (strcmp (row_id, DEFAULT_MASK_STR) == 0)  ||
+			     (strcmp (row_id, DEFAULT_USER_STR) == 0)  ||
+			     (strcmp (row_id, DEFAULT_GROUP_STR) == 0) ||	
+			     (strcmp (row_id, DEFAULT_OTHERS_STR) == 0)))
+				default_acl_obj = TRUE;
+			
+			if (!default_acl_obj && ((id) || (row_id)) && (strcmp (id, row_id) != 0))
+				continue;
+
+			if (perm_val) {
+				gnome_vfs_ace_add_perm (ace, perm);
+			} else {
+				gnome_vfs_ace_del_perm (ace, perm);
+			}
+
+			g_object_ref (window);
+			nautilus_file_set_acl (file, acl,
+					       acl_change_callback,
+					        window);
+		}
+
+		gnome_vfs_acl_free_ace_list (ace_list);
+	}
+
+	/* Update the model
+	 */
+	gtk_list_store_set (model, &iter,
+			    column, perm_val,
+			    -1);	
+}
+
+static void        
+ace_r_perm_toggled_cb (GtkCellRendererToggle *cell_renderer,
+		       gchar                 *path,
+		       gpointer               user_data)
+{
+	ace_perm_toggled_cb (cell_renderer, path, user_data, GNOME_VFS_ACL_READ, FALSE);
+}
+static void        
+ace_w_perm_toggled_cb (GtkCellRendererToggle *cell_renderer,
+		       gchar                 *path,
+		       gpointer               user_data)
+{
+	ace_perm_toggled_cb (cell_renderer, path, user_data, GNOME_VFS_ACL_WRITE, FALSE);	
+}
+static void        
+ace_x_perm_toggled_cb (GtkCellRendererToggle *cell_renderer,
+		       gchar                 *path,
+		       gpointer               user_data)
+{
+	ace_perm_toggled_cb (cell_renderer, path, user_data, GNOME_VFS_ACL_EXECUTE, FALSE);		
+}
+
+
+static void        
+ace_r_perm_def_toggled_cb (GtkCellRendererToggle *cell_renderer,
+			   gchar                 *path,
+			   gpointer               user_data)
+{
+	ace_perm_toggled_cb (cell_renderer, path, user_data, GNOME_VFS_ACL_READ, TRUE);
+}
+static void        
+ace_w_perm_def_toggled_cb (GtkCellRendererToggle *cell_renderer,
+			   gchar                 *path,
+			   gpointer               user_data)
+{
+	ace_perm_toggled_cb (cell_renderer, path, user_data, GNOME_VFS_ACL_WRITE, TRUE);	
+}
+static void        
+ace_x_perm_def_toggled_cb (GtkCellRendererToggle *cell_renderer,
+			   gchar                 *path,
+			   gpointer               user_data)
+{
+	ace_perm_toggled_cb (cell_renderer, path, user_data, GNOME_VFS_ACL_EXECUTE, TRUE);		
+}
+
+
+static GtkWidget *
+create_acl_page_list (GtkWidget *container,
+		      FMPropertiesWindow *window,
+		      gboolean default_acl_list)
+{
+	GtkListStore      *store;  // GtkTreeModel
+	GtkWidget         *view;
+	GtkCellRenderer   *renderer;
+	GtkTreeViewColumn *col;
+
+	/* Load the icons
+	 */ 
+	window->details->acl_icons[COL_ICON_USER]      = gdk_pixbuf_new_from_file (NAUTILUS_DATADIR"/user.png", NULL);
+	window->details->acl_icons[COL_ICON_NEG_USER]  = gdk_pixbuf_new_from_file (NAUTILUS_DATADIR"/user_neg.png", NULL);
+	window->details->acl_icons[COL_ICON_GROUP]     = gdk_pixbuf_new_from_file (NAUTILUS_DATADIR"/group.png", NULL);
+	window->details->acl_icons[COL_ICON_NEG_GROUP] = gdk_pixbuf_new_from_file (NAUTILUS_DATADIR"/group_neg.png", NULL);
+	window->details->acl_icons[COL_ICON_MASK]      = gdk_pixbuf_new_from_file (NAUTILUS_DATADIR"/mask.png", NULL);
+	window->details->acl_icons[COL_ICON_OTHER]     = gdk_pixbuf_new_from_file (NAUTILUS_DATADIR"/other.png", NULL);
+	window->details->acl_icons[COL_ICON_NEG_OTHER] = gdk_pixbuf_new_from_file (NAUTILUS_DATADIR"/other_neg.png", NULL);
+		  
+	/* Interface
+	 */
+	view = gtk_tree_view_new ();
+
+	/* The model
+	 */
+	store = gtk_list_store_new (NUM_COLS, 
+				    G_TYPE_INT,       /* Kind: user, group, other */
+				    GDK_TYPE_PIXBUF,  /* Type: user, group, other */
+				    G_TYPE_STRING,    /* ID */
+				    G_TYPE_BOOLEAN,   /* r */
+				    G_TYPE_BOOLEAN,   /* w */
+				    G_TYPE_BOOLEAN,   /* x */
+				    G_TYPE_STRING);   /* Effective */
+
+	gtk_tree_view_set_model (GTK_TREE_VIEW(view), GTK_TREE_MODEL(store));
+        g_object_unref (store);
+
+	/* First column */
+        col = gtk_tree_view_column_new();
+        gtk_tree_view_column_set_title (col, "");
+        gtk_tree_view_column_set_reorderable (col, TRUE);
+        gtk_tree_view_column_set_resizable (col, TRUE);
+        gtk_tree_view_append_column (GTK_TREE_VIEW(view), col);
+
+	renderer = gtk_cell_renderer_pixbuf_new();
+        gtk_tree_view_column_pack_start(col, renderer, FALSE);
+        gtk_tree_view_column_add_attribute(col, renderer, "pixbuf", COL_ICON);
+
+        renderer = gtk_cell_renderer_text_new();
+        gtk_tree_view_column_pack_start(col, renderer, TRUE);
+        gtk_tree_view_column_add_attribute(col, renderer, "text", COL_USER);
+
+	/* READ column */
+	col = gtk_tree_view_column_new();
+        gtk_tree_view_column_set_title (col, "r");
+        gtk_tree_view_column_set_reorderable (col, FALSE);
+        gtk_tree_view_append_column (GTK_TREE_VIEW(view), col);
+
+        renderer = gtk_cell_renderer_toggle_new();
+        gtk_tree_view_column_pack_start (col, renderer, TRUE);
+        gtk_tree_view_column_add_attribute (col, renderer, "active", COL_PERM_READ);
+
+	if (default_acl_list)
+		g_signal_connect_object (renderer, "toggled", G_CALLBACK(ace_r_perm_def_toggled_cb), G_OBJECT(window), 0);
+	else
+		g_signal_connect_object (renderer, "toggled", G_CALLBACK(ace_r_perm_toggled_cb), G_OBJECT(window), 0);
+
+
+	/* WRITE column */
+	col = gtk_tree_view_column_new();
+        gtk_tree_view_column_set_title (col, "w");
+        gtk_tree_view_column_set_reorderable (col, FALSE);
+        gtk_tree_view_append_column (GTK_TREE_VIEW(view), col);
+
+        renderer = gtk_cell_renderer_toggle_new();
+        gtk_tree_view_column_pack_start (col, renderer, TRUE);
+        gtk_tree_view_column_add_attribute (col, renderer, "active", COL_PERM_WRITE);
+
+	if (default_acl_list)
+		g_signal_connect_object (renderer, "toggled", G_CALLBACK(ace_w_perm_def_toggled_cb), G_OBJECT(window), 0);
+	else
+		g_signal_connect_object (renderer, "toggled", G_CALLBACK(ace_w_perm_toggled_cb), G_OBJECT(window), 0);
+
+	/* EXECUTE column */
+	col = gtk_tree_view_column_new();
+        gtk_tree_view_column_set_title (col, "x");
+        gtk_tree_view_column_set_reorderable (col, FALSE);
+        gtk_tree_view_append_column (GTK_TREE_VIEW(view), col);
+
+        renderer = gtk_cell_renderer_toggle_new();
+        gtk_tree_view_column_pack_start (col, renderer, TRUE);
+	gtk_tree_view_column_add_attribute (col, renderer, "active", COL_PERM_EXECUTE);
+
+	if (default_acl_list)
+		g_signal_connect_object (renderer, "toggled", G_CALLBACK(ace_x_perm_def_toggled_cb), G_OBJECT(window), 0);
+	else
+		g_signal_connect_object (renderer, "toggled", G_CALLBACK(ace_x_perm_toggled_cb), G_OBJECT(window), 0);
+
+	/* Effective */
+        col = gtk_tree_view_column_new();
+        gtk_tree_view_column_set_title(col, _("Effective"));
+        gtk_tree_view_column_set_reorderable(col, FALSE);
+        gtk_tree_view_append_column(GTK_TREE_VIEW(view), col);
+
+        renderer = gtk_cell_renderer_text_new();
+        gtk_tree_view_column_pack_start(col, renderer, TRUE);
+        gtk_tree_view_column_add_attribute(col, renderer, "text", COL_EFFECTIVE);
+
+	gtk_container_add (GTK_CONTAINER(container), view);
+
+	return view;
+}
+
+static void
+acl_add_dialog_response_cb (GtkDialog *dialog,
+			    gint       arg1,
+			    gpointer   user_data)  
+{
+	gchar           *id;
+	GnomeVFSACE     *ace      = GNOME_VFS_ACE(user_data);
+	GnomeVFSACLPerm  perms[4] = {0, 0, 0, 0};
+	guint            iperm    = 0;
+
+	GtkWidget *check_r = g_object_get_data (G_OBJECT(dialog), "check_r");
+	GtkWidget *check_w = g_object_get_data (G_OBJECT(dialog), "check_w");
+	GtkWidget *check_x = g_object_get_data (G_OBJECT(dialog), "check_x");
+	GtkWidget *combo   = g_object_get_data (G_OBJECT(dialog), "combo");
+	GtkWidget *entry   = g_object_get_data (G_OBJECT(dialog), "entry");
+
+	if (arg1 == GTK_RESPONSE_CANCEL)
+		return;
+	
+	/* Kind
+	 */
+	switch (gtk_combo_box_get_active (GTK_COMBO_BOX(combo))) {
+	case COL_USER_ENTRY:
+		gnome_vfs_ace_set_kind (ace, GNOME_VFS_ACL_USER);
+		break;
+	case COL_NEG_USER_ENTRY:
+		gnome_vfs_ace_set_kind (ace, GNOME_VFS_ACL_USER);
+		gnome_vfs_ace_set_negative (ace, TRUE);
+		break;
+	case COL_GROUP_ENTRY:
+		gnome_vfs_ace_set_kind (ace, GNOME_VFS_ACL_GROUP);
+		break;
+	case COL_NEG_GROUP_ENTRY:
+		gnome_vfs_ace_set_kind (ace, GNOME_VFS_ACL_GROUP);
+		gnome_vfs_ace_set_negative (ace, TRUE);
+		break;
+	default:
+		break;
+	}
+
+	/* ID
+	 */
+	id = gtk_entry_get_text (GTK_ENTRY(entry));
+	if (id != NULL) {
+		gnome_vfs_ace_set_id (ace, id);
+	} 
+
+	/* Perms
+	 */
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_r))) {
+		perms[iperm] = GNOME_VFS_ACL_READ;
+		iperm++;
+	}
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_w))) {
+		perms[iperm] = GNOME_VFS_ACL_WRITE;
+		iperm++;
+	}
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_x))) {
+		perms[iperm] = GNOME_VFS_ACL_EXECUTE;
+		iperm++;
+	}
+
+	gnome_vfs_ace_set_perms (ace, perms);
+}
+
+
+static GtkWidget *
+build_new_add_acl_dialog  (FMPropertiesWindow *window, GnomeVFSACE *ace)
+{
+	GtkWidget *dialog;
+	GtkWidget *table;
+	GtkWidget *label;
+	GtkWidget *check;
+	GtkWidget *combo;
+	GtkCellRenderer *renderer;
+	GtkListStore *combo_store;
+	GtkWidget *entry;
+	GtkTreeIter iter;
+
+	dialog = gtk_dialog_new_with_buttons (_("Add User/Group"),
+					      GTK_WINDOW(window),
+					      GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+					      GTK_STOCK_CANCEL,
+					      GTK_RESPONSE_CANCEL,
+					      GTK_STOCK_ADD,
+					      GTK_RESPONSE_ACCEPT,
+					      NULL);
+
+	table = gtk_table_new (2, 6, FALSE);
+
+	label = gtk_label_new (_("User/Group"));
+	gtk_table_attach (GTK_TABLE(table), label, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+	label = gtk_label_new (_("Name"));
+	gtk_table_attach (GTK_TABLE(table), label, 1, 2, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+	label = gtk_label_new (_("r"));
+	gtk_table_attach (GTK_TABLE(table), label, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+	label = gtk_label_new (_("w"));
+	gtk_table_attach (GTK_TABLE(table), label, 3, 4, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+	label = gtk_label_new (_("x"));
+	gtk_table_attach (GTK_TABLE(table), label, 4, 5, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+	label = gtk_label_new (_("Effective"));
+	gtk_table_attach (GTK_TABLE(table), label, 5, 6, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+	combo_store = gtk_list_store_new (1, G_TYPE_STRING, NULL);	
+	gtk_list_store_append (combo_store , &iter);
+	gtk_list_store_set (combo_store, &iter, 0, _("User"), -1);
+	gtk_list_store_append (combo_store , &iter);
+	gtk_list_store_set (combo_store, &iter, 0, _("User negative"), -1);
+	gtk_list_store_append (combo_store , &iter);
+	gtk_list_store_set (combo_store, &iter, 0, _("Group"), -1);
+	gtk_list_store_append (combo_store , &iter);
+	gtk_list_store_set (combo_store, &iter, 0, _("Group negative"), -1);
+
+	combo = gtk_combo_box_new ();
+	g_object_set_data (G_OBJECT(dialog), "combo", combo);
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT(combo), renderer, TRUE);
+	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT(combo),	renderer, "text", 0, NULL);
+	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL(combo_store));
+	g_object_unref (G_OBJECT (combo_store));
+	gtk_combo_box_set_active (combo, 0);
+	gtk_table_attach (GTK_TABLE(table), combo, 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+	entry = gtk_entry_new();
+	g_object_set_data (G_OBJECT(dialog), "entry", entry);
+	gtk_entry_set_max_length (GTK_ENTRY(entry), 64);
+	gtk_table_attach (GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+	check = gtk_check_button_new();
+	g_object_set_data (G_OBJECT(dialog), "check_r", check);
+	gtk_table_attach (GTK_TABLE(table), check, 2, 3, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
+	check = gtk_check_button_new();
+	g_object_set_data (G_OBJECT(dialog), "check_w", check);
+	gtk_table_attach (GTK_TABLE(table), check, 3, 4, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
+	check = gtk_check_button_new();
+	g_object_set_data (G_OBJECT(dialog), "check_x", check);
+	gtk_table_attach (GTK_TABLE(table), check, 4, 5, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+	label = gtk_label_new (" - - - ");
+	gtk_table_attach (GTK_TABLE(table), label, 5, 6, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->vbox), table, TRUE, TRUE, 0);
+
+	g_signal_connect_object (dialog, "response",
+				 G_CALLBACK (acl_add_dialog_response_cb), 
+				 G_OBJECT (ace), 0);
+
+	return dialog;
+}
+
+static void
+add_acl_callback_generic (GtkWidget *button, gpointer user_data, gboolean inherit)
+{
+	gint                result;
+	GtkWidget          *dialog;
+	GnomeVFSACL        *acl;
+	GnomeVFSACE        *ace;
+	NautilusFile       *file;
+	FMPropertiesWindow *window = user_data;
+
+	ace = gnome_vfs_ace_new (0, NULL, 0);
+
+	dialog = build_new_add_acl_dialog (window, ace);
+	gtk_widget_show_all (dialog);
+
+	result = gtk_dialog_run (dialog);
+	gtk_widget_destroy (dialog);
+
+	if (result == GTK_RESPONSE_CANCEL) {
+		g_object_unref (ace);
+		return;
+	}
+	
+	gnome_vfs_ace_set_inherit (ace, inherit);
+
+
+	file = get_target_file (window);
+	acl  = nautilus_file_get_acl (file);
+	
+	gnome_vfs_acl_set (acl, ace);
+	g_object_unref (ace);
+	
+	g_object_ref (window);
+	nautilus_file_set_acl (file, acl,
+			       acl_change_callback,
+			       window);
+}
+
+static void
+add_acl_callback (GtkWidget *button, gpointer user_data)
+{
+	add_acl_callback_generic (button, user_data, FALSE);
+}
+
+static void
+add_acl_default_callback (GtkWidget *button, gpointer user_data)
+{
+	add_acl_callback_generic (button, user_data, TRUE);
+}
+
+static void
+del_acl_foreach_selected_generic (GtkTreeModel *model,
+				  GtkTreePath *path,
+				  GtkTreeIter *iter,
+				  gpointer data,
+				  gboolean is_default)
+{
+	GList *l, *i;
+	gchar *row_id;
+	GList *file_list;
+	gboolean row_r, row_w, row_x;
+	GnomeVFSACLKind row_kind;
+	FMPropertiesWindow *window = data;
+
+	/* Extract the information from the row
+	 */
+	gtk_tree_model_get (model, iter, 
+			    COL_USER, &row_id, 
+			    COL_KIND, &row_kind,
+			    COL_PERM_READ, &row_r,
+			    COL_PERM_WRITE, &row_w,
+			    COL_PERM_EXECUTE, &row_x,
+			    -1);
+
+	if (row_kind == GNOME_VFS_ACL_MASK) {
+		return;
+	}
+
+	/* Compare it with the ACEs
+	 */
+	file_list = window->details->original_files;
+
+	for (l = file_list; l != NULL; l = l->next) {
+		GnomeVFSACL *acl;
+		NautilusFile *file;
+		GList *ace_list;
+
+		file = NAUTILUS_FILE (l->data);
+		acl = nautilus_file_get_acl (file);
+
+		ace_list = gnome_vfs_acl_get_ace_list (acl);
+		for (i=ace_list; i; i=i->next) {
+			const char            *id;
+			GnomeVFSACE           *ace;
+			const GnomeVFSACLPerm *perms;
+			GnomeVFSACLKind        kind;
+			gboolean               inherit;
+			gboolean               negative;
+
+			ace = i->data;
+
+			id       = gnome_vfs_ace_get_id (ace);
+			kind     = gnome_vfs_ace_get_kind (ace);
+			perms    = gnome_vfs_ace_get_perms (ace);
+			inherit  = gnome_vfs_ace_get_inherit (ace);
+			negative = gnome_vfs_ace_get_negative (ace);
+
+			if ((kind != row_kind) ||
+			    (inherit != is_default) ||
+			    (row_r != gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_READ)) ||
+			    (row_w != gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_WRITE)) ||
+			    (row_x != gnome_vfs_ace_check_perm (ace, GNOME_VFS_ACL_EXECUTE))) 
+			{
+				continue;
+			}
+
+			if (id && row_id && (strcmp (id, row_id) == 0)) {
+				gnome_vfs_acl_unset (acl, ace);
+				
+				g_object_ref (window);
+				nautilus_file_set_acl (file, acl,
+						       acl_change_callback,
+						       window);
+			}
+		}
+
+		gnome_vfs_acl_free_ace_list (ace_list);
+	}
+	
+	/* Remove that list row
+	 */
+	gtk_list_store_remove (model, iter);
+}
+
+static void
+del_acl_foreach_selected (GtkTreeModel *model,
+			  GtkTreePath *path,
+			  GtkTreeIter *iter,
+			  gpointer data)
+{
+	del_acl_foreach_selected_generic (model, path, iter, data, FALSE);
+}
+
+static void
+del_acl_default_foreach_selected (GtkTreeModel *model,
+				  GtkTreePath *path,
+				  GtkTreeIter *iter,
+				  gpointer data)
+{
+	del_acl_foreach_selected_generic (model, path, iter, data, TRUE);
+}
+
+
+static void
+remove_acl_callback (GtkWidget *button, gpointer user_data)
+{
+	GtkTreeSelection *selection;
+	FMPropertiesWindow *window = user_data;
+
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (window->details->acl_view));        
+        gtk_tree_selection_selected_foreach (selection, del_acl_foreach_selected, window);
+}
+
+static void
+remove_acl_default_callback (GtkWidget *button, gpointer user_data)
+{
+	GtkTreeSelection *selection;
+	FMPropertiesWindow *window = user_data;
+
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (window->details->acl_default_view));        
+        gtk_tree_selection_selected_foreach (selection, del_acl_default_foreach_selected, window);
+}
+
+
+static void
+create_acl_page (FMPropertiesWindow *window)
+{
+	GtkWidget *vbox;
+	GtkWidget *hbox;
+	GtkWidget *button_box;
+	GList *file_list;
+	GtkWidget *button_add;
+	GtkWidget *button_remove;
+	GtkWidget *empty_label;
+	GtkWidget *scroll;
+	GtkWidget *view;
+	GtkWidget *title;
+	gboolean   dir_found;
+	GtkWidget *panel = NULL;
+	GtkWidget *block;
+
+	dir_found = file_list_some_directory (window->details->target_files);
+
+	vbox = create_page_with_vbox (window->details->notebook,
+				      _("ACL"));
+	if (dir_found) {
+		panel = gtk_vpaned_new();
+		gtk_box_pack_start (GTK_BOX (vbox), panel, TRUE, TRUE, 0);
+	}
+
+	file_list = window->details->original_files;
+
+	if (all_can_get_acl (file_list)) {
+		block = gtk_vbox_new (FALSE, 0);
+
+		window->details->initial_acl = get_initial_acl (window->details->target_files);
+
+		if (!all_can_set_permissions (file_list)) {
+			add_prompt_and_separator (
+				GTK_VBOX (block), 
+				_("You are not the owner, so you can't change these permissions."));
+		}
+
+		title = gtk_label_new (_("Common ACL"));
+		gtk_label_set_justify (GTK_LABEL(title), GTK_JUSTIFY_LEFT);
+		gtk_box_pack_start (GTK_BOX (block), title, FALSE, FALSE, 0);
+
+		hbox = gtk_hbox_new (FALSE, 0);
+		gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
+		gtk_box_pack_start (GTK_BOX (block), hbox, TRUE, TRUE, 0);
+
+		/* Left hand column
+		 */
+		scroll = gtk_scrolled_window_new (NULL, NULL);
+		gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), 
+						GTK_POLICY_AUTOMATIC,
+						GTK_POLICY_AUTOMATIC);
+
+
+		window->details->acl_view = create_acl_page_list (scroll, window, FALSE);
+		gtk_box_pack_start (GTK_BOX(hbox), GTK_WIDGET(scroll), TRUE, TRUE, 0);
+
+		/* Right hand column
+		 */
+		button_box = gtk_vbox_new (FALSE, 0);
+		window->details->acl_buttons = button_box;
+		button_add    = gtk_button_new_from_stock (GTK_STOCK_ADD);
+		button_remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+		empty_label   = gtk_label_new("");
+
+		g_signal_connect_object (button_add, "clicked",
+					 G_CALLBACK (add_acl_callback),
+					 G_OBJECT (window),
+					 0);
+		g_signal_connect_object (button_remove, "clicked",
+					 G_CALLBACK (remove_acl_callback),
+					 G_OBJECT (window),
+					 0);
+
+		gtk_box_pack_start (GTK_BOX(button_box), button_add, FALSE, FALSE, 0);
+		gtk_box_pack_start (GTK_BOX(button_box), button_remove, FALSE, FALSE, 0);
+		gtk_box_pack_start (GTK_BOX(button_box), empty_label, TRUE, TRUE, 0);
+
+		gtk_box_pack_start (GTK_BOX(hbox), GTK_WIDGET(button_box), FALSE, FALSE, 0);		
+
+		if (panel)
+			gtk_paned_add1 (panel, block);
+		else
+			gtk_box_pack_start (GTK_BOX (vbox), block, TRUE, TRUE, 0);			
+	}
+
+	/* Default ACLs
+	 */
+	if (dir_found) {
+		block = gtk_vbox_new (FALSE, 0);
+
+		title = gtk_label_new (_("Default ACL"));
+		gtk_label_set_justify (title, GTK_JUSTIFY_LEFT);
+		gtk_box_pack_start (GTK_BOX (block), title, FALSE, FALSE, 0);
+
+		hbox = gtk_hbox_new (FALSE, 0);
+		gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
+		gtk_box_pack_start (GTK_BOX (block), hbox, TRUE, TRUE, 0);
+
+		scroll = gtk_scrolled_window_new (NULL, NULL);
+		gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), 
+						GTK_POLICY_AUTOMATIC,
+						GTK_POLICY_AUTOMATIC);
+		
+		window->details->acl_default_view = create_acl_page_list (scroll, window, TRUE);
+		gtk_box_pack_start (GTK_BOX(hbox), GTK_WIDGET(scroll), TRUE, TRUE, 0);
+
+		/* Right hand column
+		 */
+		button_box    = gtk_vbox_new (FALSE, 0);
+		window->details->acl_def_buttons = button_box;
+		button_add    = gtk_button_new_from_stock (GTK_STOCK_ADD);
+		button_remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+		empty_label   = gtk_label_new("");
+
+		g_signal_connect_object (button_add, "clicked",
+					 G_CALLBACK (add_acl_default_callback),
+					 G_OBJECT (window),
+					 0);
+		g_signal_connect_object (button_remove, "clicked",
+					 G_CALLBACK (remove_acl_default_callback),
+					 G_OBJECT (window),
+					 0);
+
+		gtk_box_pack_start (GTK_BOX(button_box), button_add, FALSE, FALSE, 0);
+		gtk_box_pack_start (GTK_BOX(button_box), button_remove, FALSE, FALSE, 0);
+		gtk_box_pack_start (GTK_BOX(button_box), empty_label, TRUE, TRUE, 0);
+
+		gtk_box_pack_start (GTK_BOX(hbox), GTK_WIDGET(button_box), FALSE, FALSE, 0);		
+
+		gtk_paned_add2 (panel, block);
+	}
+
+	gtk_widget_show_all (vbox);
+}
+
+
 static void
 create_permissions_page (FMPropertiesWindow *window)
 {
@@ -3264,6 +4319,27 @@
 	return TRUE;
 }
 
+static gboolean
+should_show_acls (FMPropertiesWindow *window)
+{
+	NautilusFile *file;
+	
+	if (is_multi_file_window (window)) {
+		return FALSE;
+	}
+
+	/* Don't show ACL tab for desktop special icons (trash, etc)
+	 * or desktop files. We don't get the open-with menu for these anyway.
+	 */
+	file = get_original_file (window);
+	if (file == NULL ||
+	    NAUTILUS_IS_DESKTOP_ICON_FILE (file) ||
+	    nautilus_file_is_nautilus_link (file)) {
+		return FALSE;
+	}
+	return TRUE;
+}
+
 static void
 create_open_with_page (FMPropertiesWindow *window)
 {
@@ -3393,6 +4469,10 @@
 		create_open_with_page (window);
 	}
 
+	if (should_show_acls (window)) {
+		create_acl_page (window);
+	}
+
 	/* append pages from available views */
 	append_extension_pages (window);
 
@@ -3956,6 +5036,5 @@
 fm_properties_window_instance_init (FMPropertiesWindow *window)
 {
 	window->details = g_new0 (FMPropertiesWindowDetails, 1);
-
 	eel_gtk_window_set_up_close_accelerator (GTK_WINDOW (window));
 }
--- nautilus-2.13.4/libnautilus-private/nautilus-file.c	2006-03-07 15:11:34.267720000 +0000
+++ nautilus-2.13.4-ACLed/libnautilus-private/nautilus-file.c	2006-03-08 14:37:03.003460000 +0000
@@ -3538,6 +3538,84 @@
 	gnome_vfs_uri_unref (vfs_uri);
 }
 
+gboolean
+nautilus_file_can_get_acl (NautilusFile *file)
+{
+	return !nautilus_file_info_missing (file, GNOME_VFS_FILE_INFO_FIELDS_ACL);
+}
+
+gboolean                
+nautilus_file_can_set_acl (NautilusFile *file)
+{
+	uid_t user_id;
+
+	if (!nautilus_file_can_get_acl (file)) {
+		return FALSE;
+	}
+
+	/* Check the user. */
+	user_id = geteuid();
+
+	/* Owner is allowed to set group (with restrictions). */
+	if (user_id == (uid_t) file->details->info->uid) {
+		return TRUE;
+	}
+
+	/* Root is also allowed to set group. */
+	if (user_id == 0) {
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+GnomeVFSACL *           
+nautilus_file_get_acl (NautilusFile *file)
+{
+	return nautilus_file_info_missing (file, GNOME_VFS_FILE_INFO_FIELDS_ACL)
+		? NULL : file->details->info->acl;	
+}
+
+void
+nautilus_file_set_acl (NautilusFile *file, 
+		       GnomeVFSACL *acl,
+		       NautilusFileOperationCallback callback,
+		       gpointer callback_data)
+{
+	Operation *op;
+	GnomeVFSURI *vfs_uri;
+	GnomeVFSFileInfo *partial_file_info;
+	GnomeVFSFileInfoOptions options;
+
+	if (!nautilus_file_can_set_acl (file)) {
+		nautilus_file_changed (file);
+		(* callback) (file, GNOME_VFS_ERROR_ACCESS_DENIED, callback_data);
+		return;
+	}
+
+	op = operation_new (file, callback, callback_data);
+	op->use_slow_mime = file->details->got_slow_mime_type;
+
+	options = GNOME_VFS_FILE_INFO_GET_ACL
+		| GNOME_VFS_FILE_INFO_GET_MIME_TYPE
+		| GNOME_VFS_FILE_INFO_FOLLOW_LINKS;
+	if (op->use_slow_mime) {
+		options |= GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE;
+	}
+
+	partial_file_info = gnome_vfs_file_info_new ();
+	partial_file_info->acl = acl;
+	vfs_uri = nautilus_file_get_gnome_vfs_uri (file);	
+	gnome_vfs_async_set_file_info (&op->handle,
+				       vfs_uri, partial_file_info, 
+				       GNOME_VFS_SET_FILE_INFO_ACL,
+				       options,
+				       GNOME_VFS_PRIORITY_DEFAULT,
+				       set_permissions_callback, op);	
+	gnome_vfs_file_info_unref (partial_file_info);
+	gnome_vfs_uri_unref (vfs_uri);
+}
+
 static char *
 get_user_name_from_id (uid_t uid)
 {
--- nautilus-2.13.4/libnautilus-private/nautilus-file.h	2006-03-07 15:11:34.041615000 +0000
+++ nautilus-2.13.4-ACLed/libnautilus-private/nautilus-file.h	2006-03-07 14:56:32.845077000 +0000
@@ -198,6 +198,15 @@
 GList *                 nautilus_get_all_group_names                    (void);
 GList *                 nautilus_file_get_settable_group_names          (NautilusFile                   *file);
 
+/* ACL */
+gboolean                nautilus_file_can_get_acl                       (NautilusFile                   *file);
+gboolean                nautilus_file_can_set_acl                       (NautilusFile                   *file);
+GnomeVFSACL *           nautilus_file_get_acl                           (NautilusFile                   *file);
+void                    nautilus_file_set_acl                           (NautilusFile                   *file,
+									 GnomeVFSACL                    *acl,
+									 NautilusFileOperationCallback   callback,
+									 gpointer                        callback_data);
+
 /* "Capabilities". */
 gboolean                nautilus_file_can_read                          (NautilusFile                   *file);
 gboolean                nautilus_file_can_write                         (NautilusFile                   *file);
--- nautilus-2.13.4/libnautilus-private/nautilus-directory-async.c	2006-03-07 15:11:34.091270000 +0000
+++ nautilus-2.13.4-ACLed/libnautilus-private/nautilus-directory-async.c	2006-03-07 14:56:32.911114000 +0000
@@ -2812,6 +2812,7 @@
 
 	options = GNOME_VFS_FILE_INFO_GET_MIME_TYPE
 		| GNOME_VFS_FILE_INFO_FOLLOW_LINKS
+		| GNOME_VFS_FILE_INFO_GET_ACL
 		| GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS;
 	if (need_slow_mime) {
 		options |= GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE;
