--- a/ChangeLog Tue Nov 07 14:48:11 2006 +0000
+++ b/ChangeLog Tue Nov 07 14:55:35 2006 +0000
@@ -1,3 +1,23 @@
+2006-11-07 Ghee Seng Teo - <[email protected]>
+
+ * gnome-vfs.spec: removed patches/gnome-vfs-02-uninstalled-pc.diff. No longer
+ needed. but has logged bugzilla bug 371610.
+ * patches/gnome-vfs-02-uninstalled-pc.diff: removed
+ * patches/gnome-vfs-03-gopher-proxy-schema.diff: renamed
+ * patches/gnome-vfs-04-default-url-handler.diff: renamed.
+ * patches/gnome-vfs-05-mime-info-file-path.diff: renamed.
+ * patches/gnome-vfs-06-g11n-i18n-ui.diff: renamed.
+ * patches/gnome-vfs-07-trash-only-home.diff: renamed.
+ * patches/gnome-vfs-08-mount-points-fix.diff: renamed.
+ * patches/gnome-vfs-09-trash-files-from-different-filesystem.diff: renamed.
+ * patches/gnome-vfs-10-socks-version.diff: renamed.
+ * patches/gnome-vfs-11-audio-cd-show-icon.diff: renamed.
+ * patches/gnome-vfs-12-trash-skip-copy.diff: renamed.
+ * patches/gnome-vfs-13-login_tty.diff: renamed.
+ * patches/gnome-vfs-14-krb5-config-no-gssapi.diff: renamed.
+ * patches/gnome-vfs-15-hidden.diff: renamed.
+ * patches/gnome-vfs-16-acl-permissions.diff: renamed.
+
2006-11-07 Halton Huo <[email protected]>
Fix for bugster #6483870, bugzilla #310965.
--- a/gnome-vfs.spec Tue Nov 07 14:48:11 2006 +0000
+++ b/gnome-vfs.spec Tue Nov 07 14:55:35 2006 +0000
@@ -1,4 +1,4 @@
-#
+# Owner: gheet
# spec file for package gnome-vfs
#
# Copyright (c) 2005 Sun Microsystems, Inc.
@@ -21,21 +21,20 @@
Source5: gnomevfs-info.1.gz
Source6: gnomevfs-ls.1.gz
Patch1: gnome-vfs-01-uri-canonizing.diff
-Patch2: gnome-vfs-02-uninstalled-pc.diff
-Patch3: gnome-vfs-03-gopher-proxy-schema.diff
-Patch4: gnome-vfs-04-default-url-handler.diff
-Patch5: gnome-vfs-05-mime-info-file-path.diff
-Patch6: gnome-vfs-06-g11n-i18n-ui.diff
-Patch7: gnome-vfs-07-trash-only-home.diff
-Patch8: gnome-vfs-08-mount-points-fix.diff
-Patch9: gnome-vfs-09-trash-files-from-different-filesystem.diff
-Patch10: gnome-vfs-10-socks-version.diff
-Patch11: gnome-vfs-11-audio-cd-show-icon.diff
-Patch12: gnome-vfs-12-trash-skip-copy.diff
-Patch13: gnome-vfs-13-login_tty.diff
-Patch14: gnome-vfs-14-krb5-config-no-gssapi.diff
-Patch15: gnome-vfs-15-hidden.diff
-Patch16: gnome-vfs-16-acl-permissions.diff
+Patch2: gnome-vfs-02-gopher-proxy-schema.diff
+Patch3: gnome-vfs-03-default-url-handler.diff
+Patch4: gnome-vfs-04-mime-info-file-path.diff
+Patch5: gnome-vfs-05-g11n-i18n-ui.diff
+Patch6: gnome-vfs-06-trash-only-home.diff
+Patch7: gnome-vfs-07-mount-points-fix.diff
+Patch8: gnome-vfs-08-trash-files-from-different-filesystem.diff
+Patch9: gnome-vfs-09-socks-version.diff
+Patch10: gnome-vfs-10-audio-cd-show-icon.diff
+Patch11: gnome-vfs-11-trash-skip-copy.diff
+Patch12: gnome-vfs-12-login_tty.diff
+Patch13: gnome-vfs-13-krb5-config-no-gssapi.diff
+Patch14: gnome-vfs-14-hidden.diff
+Patch15: gnome-vfs-15-acl-permissions.diff
URL: http://www.gnome.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -197,6 +196,8 @@
%{_mandir}/man3/*
%changelog
+* Tue Nov 7 2006 - [email protected]
+- removed gnome-vfs-02-uninstalled-pc.diff (logged as bugzilla 371610)
* Fri Nov 3 2006 - [email protected]
- use %gtk_doc_option in configure so that it can be disabled using
--without-gtk-doc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-02-gopher-proxy-schema.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,32 @@
+--- gnome-vfs-2.5.7/schemas/system_http_proxy.schemas.in 2003-12-28 09:44:21.000000000 +0000
++++ gnome-vfs-2.5.7.new/schemas/system_http_proxy.schemas.in 2004-03-09 13:51:18.000000000 +0000
+@@ -170,6 +170,29 @@
+ </locale>
+ </schema>
+ <schema>
++ <key>/schemas/system/proxy/gopher_host</key>
++ <applyto>/system/proxy/gopher_host</applyto>
++ <owner>gnome</owner>
++ <type>string</type>
++ <default></default>
++ <locale name="C">
++ <short>gopher proxy host name</short>
++ <long>The machine name to proxy gopher connections through.</long>
++ </locale>
++ </schema>
++ <schema>
++ <key>/schemas/system/proxy/gopher_port</key>
++ <applyto>/system/proxy/gopher_port</applyto>
++ <owner>gnome</owner>
++ <type>int</type>
++ <default>8080</default>
++ <locale name="C">
++ <short>ftp port</short>
++ <long>The port on the machine defined by /system/proxy/gopher_host
++ that you proxy gopher through</long>
++ </locale>
++ </schema>
++ <schema>
+ <key>/schemas/system/proxy/autoconfig_url</key>
+ <applyto>/system/proxy/autoconfig_url</applyto>
+ <owner>gnome-vfs</owner>
--- a/patches/gnome-vfs-02-uninstalled-pc.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
---- gnome-vfs-2.5.7/configure.in 2004-02-11 08:34:02.000000000 +0000
-+++ gnome-vfs-2.5.7.new/configure.in 2004-02-25 15:17:16.000000000 +0000
-@@ -732,6 +732,8 @@
- doc/version.xml
- gnome-vfs-2.0.pc
- gnome-vfs-module-2.0.pc
-+gnome-vfs-2.0-uninstalled.pc
-+gnome-vfs-module-2.0-uninstalled.pc
- ])
-
- chmod u+x test/vfs-run
---- gnome-vfs-2.5.7/gnome-vfs-2.0-uninstalled.pc.in 1970-01-01 01:00:00.000000000 +0100
-+++ gnome-vfs-2.5.7.new/gnome-vfs-2.0-uninstalled.pc.in 2004-02-25 15:22:07.000000000 +0000
-@@ -0,0 +1,12 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+
-+Name: gnome-vfs
-+Description: The GNOME virtual file-system libraries
-+Version: @VERSION@
-+Requires: bonobo-activation-2.0,gthread-2.0,gmodule-2.0
-+Libs: ${pc_top_builddir}/${pcfiledir}/libgnomevfs/libgnomevfs-2.la
-+Cflags: -I${pc_top_builddir}/${pcfiledir}
---- gnome-vfs-2.5.7/gnome-vfs-module-2.0-uninstalled.pc.in 1970-01-01 01:00:00.000000000 +0100
-+++ gnome-vfs-2.5.7.new/gnome-vfs-module-2.0-uninstalled.pc.in 2004-02-25 15:26:16.000000000 +0000
-@@ -0,0 +1,12 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+
-+Name: gnome-vfs-module
-+Description: The GNOME virtual file-system module include info
-+Version: @VERSION@
-+Requires: bonobo-activation-2.0,gthread-2.0,gmodule-2.0
-+Libs: ${pc_top_builddir}/${pcfiledir}/libgnomevfs/libgnomevfs-2.la
-+Cflags: -I${pc_top_builddir}/${pcfiledir}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-03-default-url-handler.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,21 @@
+diff -urN gnome-vfs-2.10.1/schemas/desktop_gnome_url_handlers.schemas.in gnome-vfs-2.10.1-hacked/schemas/desktop_gnome_url_handlers.schemas.in
+--- gnome-vfs-2.10.1/schemas/desktop_gnome_url_handlers.schemas.in 2005-04-26 14:44:08.284134456 +1200
++++ gnome-vfs-2.10.1-hacked/schemas/desktop_gnome_url_handlers.schemas.in 2005-04-26 14:44:56.563794832 +1200
+@@ -153,7 +153,7 @@
+ <applyto>/desktop/gnome/url-handlers/http/command</applyto>
+ <owner>gnome</owner>
+ <type>string</type>
+- <default>epiphany %s</default>
++ <default>mozilla %s</default>
+ <locale name="C">
+ <short>The handler for "http" URLs</short>
+ <long>The command used to handle "http" URLs, if enabled.</long>
+@@ -187,7 +187,7 @@
+ <applyto>/desktop/gnome/url-handlers/https/command</applyto>
+ <owner>gnome</owner>
+ <type>string</type>
+- <default>epiphany %s</default>
++ <default>mozilla %s</default>
+ <locale name="C">
+ <short>The handler for "https" URLs</short>
+ <long>The command used to handle "https" URLs, if enabled.</long>
--- a/patches/gnome-vfs-03-gopher-proxy-schema.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
---- gnome-vfs-2.5.7/schemas/system_http_proxy.schemas.in 2003-12-28 09:44:21.000000000 +0000
-+++ gnome-vfs-2.5.7.new/schemas/system_http_proxy.schemas.in 2004-03-09 13:51:18.000000000 +0000
-@@ -170,6 +170,29 @@
- </locale>
- </schema>
- <schema>
-+ <key>/schemas/system/proxy/gopher_host</key>
-+ <applyto>/system/proxy/gopher_host</applyto>
-+ <owner>gnome</owner>
-+ <type>string</type>
-+ <default></default>
-+ <locale name="C">
-+ <short>gopher proxy host name</short>
-+ <long>The machine name to proxy gopher connections through.</long>
-+ </locale>
-+ </schema>
-+ <schema>
-+ <key>/schemas/system/proxy/gopher_port</key>
-+ <applyto>/system/proxy/gopher_port</applyto>
-+ <owner>gnome</owner>
-+ <type>int</type>
-+ <default>8080</default>
-+ <locale name="C">
-+ <short>ftp port</short>
-+ <long>The port on the machine defined by /system/proxy/gopher_host
-+ that you proxy gopher through</long>
-+ </locale>
-+ </schema>
-+ <schema>
- <key>/schemas/system/proxy/autoconfig_url</key>
- <applyto>/system/proxy/autoconfig_url</applyto>
- <owner>gnome-vfs</owner>
--- a/patches/gnome-vfs-04-default-url-handler.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-diff -urN gnome-vfs-2.10.1/schemas/desktop_gnome_url_handlers.schemas.in gnome-vfs-2.10.1-hacked/schemas/desktop_gnome_url_handlers.schemas.in
---- gnome-vfs-2.10.1/schemas/desktop_gnome_url_handlers.schemas.in 2005-04-26 14:44:08.284134456 +1200
-+++ gnome-vfs-2.10.1-hacked/schemas/desktop_gnome_url_handlers.schemas.in 2005-04-26 14:44:56.563794832 +1200
-@@ -153,7 +153,7 @@
- <applyto>/desktop/gnome/url-handlers/http/command</applyto>
- <owner>gnome</owner>
- <type>string</type>
-- <default>epiphany %s</default>
-+ <default>mozilla %s</default>
- <locale name="C">
- <short>The handler for "http" URLs</short>
- <long>The command used to handle "http" URLs, if enabled.</long>
-@@ -187,7 +187,7 @@
- <applyto>/desktop/gnome/url-handlers/https/command</applyto>
- <owner>gnome</owner>
- <type>string</type>
-- <default>epiphany %s</default>
-+ <default>mozilla %s</default>
- <locale name="C">
- <short>The handler for "https" URLs</short>
- <long>The command used to handle "https" URLs, if enabled.</long>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-04-mime-info-file-path.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,12 @@
+diff -urN gnome-vfs-2.10.1/libgnomevfs/xdgmime.c gnome-vfs-2.10.1-hacked/libgnomevfs/xdgmime.c
+--- gnome-vfs-2.10.1/libgnomevfs/xdgmime.c 2004-12-10 04:43:48.000000000 +1300
++++ gnome-vfs-2.10.1-hacked/libgnomevfs/xdgmime.c 2005-04-26 14:46:23.988504256 +1200
+@@ -207,7 +207,7 @@
+
+ xdg_data_dirs = getenv ("XDG_DATA_DIRS");
+ if (xdg_data_dirs == NULL)
+- xdg_data_dirs = "/usr/local/share/:/usr/share/";
++ xdg_data_dirs = GNOME_VFS_DATADIR":/usr/share/gnome/:/usr/sfw/share:/usr/local/share/:/usr/share/";
+
+ ptr = xdg_data_dirs;
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-05-g11n-i18n-ui.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,33 @@
+diff -urN gnome-vfs-2.6.0-orig/libgnomevfs/gnome-vfs-volume-monitor-daemon.c gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
+--- gnome-vfs-2.6.0-orig/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2005-02-26 00:21:12.353647280 +0900
++++ gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2005-02-26 00:21:58.311660600 +0900
+@@ -691,6 +692,15 @@
+ {
+ int i;
+ char *name;
++ struct { char *machine; char *readable; } readable_table[] = {
++ { "floppy", N_("Floppy") },
++ { "cdrom", N_("CD-ROM") },
++ { "zip", N_("Zip Drive") },
++ { "memstick", N_("Memory Stick") },
++ { "camera", N_("Camera") },
++ { "dvd", N_("DVD") },
++ { NULL, NULL}
++ };
+
+ if (unmodified_name == NULL) {
+ return NULL;
+@@ -710,6 +720,13 @@
+ name[i] = '-';
+ }
+ }
++ for (i = 0; readable_table[i].machine != NULL; i ++) {
++ if (!strcmp (name, readable_table[i].machine)) {
++ g_free (name);
++ return g_strdup (_(readable_table[i].readable));
++ }
++ }
++
+
+ /* Save pretty name back into volume info */
+ return name;
--- a/patches/gnome-vfs-05-mime-info-file-path.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff -urN gnome-vfs-2.10.1/libgnomevfs/xdgmime.c gnome-vfs-2.10.1-hacked/libgnomevfs/xdgmime.c
---- gnome-vfs-2.10.1/libgnomevfs/xdgmime.c 2004-12-10 04:43:48.000000000 +1300
-+++ gnome-vfs-2.10.1-hacked/libgnomevfs/xdgmime.c 2005-04-26 14:46:23.988504256 +1200
-@@ -207,7 +207,7 @@
-
- xdg_data_dirs = getenv ("XDG_DATA_DIRS");
- if (xdg_data_dirs == NULL)
-- xdg_data_dirs = "/usr/local/share/:/usr/share/";
-+ xdg_data_dirs = GNOME_VFS_DATADIR":/usr/share/gnome/:/usr/sfw/share:/usr/local/share/:/usr/share/";
-
- ptr = xdg_data_dirs;
-
--- a/patches/gnome-vfs-06-g11n-i18n-ui.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-diff -urN gnome-vfs-2.6.0-orig/libgnomevfs/gnome-vfs-volume-monitor-daemon.c gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
---- gnome-vfs-2.6.0-orig/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2005-02-26 00:21:12.353647280 +0900
-+++ gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2005-02-26 00:21:58.311660600 +0900
-@@ -691,6 +692,15 @@
- {
- int i;
- char *name;
-+ struct { char *machine; char *readable; } readable_table[] = {
-+ { "floppy", N_("Floppy") },
-+ { "cdrom", N_("CD-ROM") },
-+ { "zip", N_("Zip Drive") },
-+ { "memstick", N_("Memory Stick") },
-+ { "camera", N_("Camera") },
-+ { "dvd", N_("DVD") },
-+ { NULL, NULL}
-+ };
-
- if (unmodified_name == NULL) {
- return NULL;
-@@ -710,6 +720,13 @@
- name[i] = '-';
- }
- }
-+ for (i = 0; readable_table[i].machine != NULL; i ++) {
-+ if (!strcmp (name, readable_table[i].machine)) {
-+ g_free (name);
-+ return g_strdup (_(readable_table[i].readable));
-+ }
-+ }
-+
-
- /* Save pretty name back into volume info */
- return name;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-06-trash-only-home.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,25 @@
+--- gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume.c 2004-10-19 14:42:43.072945304 +0530
++++ gnome-vfs-2.6.0-new/libgnomevfs/gnome-vfs-volume.c 2004-10-19 14:42:25.243655768 +0530
+@@ -251,7 +251,21 @@ gnome_vfs_volume_handles_trash (GnomeVFS
+ return FALSE;
+ }
+ if (volume->priv->filesystem_type != NULL) {
+- return _gnome_vfs_filesystem_use_trash (volume->priv->filesystem_type);
++ GnomeVFSVolume *home_volume = NULL;
++
++ /* $HOME only will contain Trash folder. Get the volume
++ * corresponding to user's home directory
++ */
++ home_volume = gnome_vfs_volume_monitor_get_volume_for_path (gnome_vfs_get_volume_monitor (), g_get_home_dir ());
++
++ g_return_val_if_fail (home_volume != NULL, FALSE);
++
++ /* Does this volume contain the ~/.Trash folder? */
++ if (gnome_vfs_volume_compare (home_volume, volume) == 0) {
++ return _gnome_vfs_filesystem_use_trash (volume->priv->filesystem_type);
++ } else {
++ return FALSE;
++ }
+ }
+ return FALSE;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-07-mount-points-fix.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,13 @@
+--- gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume-monitor.c 2003-12-05 01:46:55.000000000 +0530
++++ gnome-vfs-2.6.0-new/libgnomevfs/gnome-vfs-volume-monitor.c 2004-11-10 20:48:37.559906000 +0530
+@@ -659,7 +659,9 @@ gnome_vfs_volume_monitor_get_volume_for_
+ g_mutex_lock (volume_monitor->priv->mutex);
+ for (l = volume_monitor->priv->mtab_volumes; l != NULL; l = l->next) {
+ volume = l->data;
+- if (volume->priv->unix_device == device) {
++ if (volume->priv->unix_device == device &&
++ volume->priv->filesystem_type &&
++ strcmp (volume->priv->filesystem_type, "lofs")) {
+ res = gnome_vfs_volume_ref (volume);
+ break;
+ }
--- a/patches/gnome-vfs-07-trash-only-home.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume.c 2004-10-19 14:42:43.072945304 +0530
-+++ gnome-vfs-2.6.0-new/libgnomevfs/gnome-vfs-volume.c 2004-10-19 14:42:25.243655768 +0530
-@@ -251,7 +251,21 @@ gnome_vfs_volume_handles_trash (GnomeVFS
- return FALSE;
- }
- if (volume->priv->filesystem_type != NULL) {
-- return _gnome_vfs_filesystem_use_trash (volume->priv->filesystem_type);
-+ GnomeVFSVolume *home_volume = NULL;
-+
-+ /* $HOME only will contain Trash folder. Get the volume
-+ * corresponding to user's home directory
-+ */
-+ home_volume = gnome_vfs_volume_monitor_get_volume_for_path (gnome_vfs_get_volume_monitor (), g_get_home_dir ());
-+
-+ g_return_val_if_fail (home_volume != NULL, FALSE);
-+
-+ /* Does this volume contain the ~/.Trash folder? */
-+ if (gnome_vfs_volume_compare (home_volume, volume) == 0) {
-+ return _gnome_vfs_filesystem_use_trash (volume->priv->filesystem_type);
-+ } else {
-+ return FALSE;
-+ }
- }
- return FALSE;
- }
--- a/patches/gnome-vfs-08-mount-points-fix.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
---- gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-volume-monitor.c 2003-12-05 01:46:55.000000000 +0530
-+++ gnome-vfs-2.6.0-new/libgnomevfs/gnome-vfs-volume-monitor.c 2004-11-10 20:48:37.559906000 +0530
-@@ -659,7 +659,9 @@ gnome_vfs_volume_monitor_get_volume_for_
- g_mutex_lock (volume_monitor->priv->mutex);
- for (l = volume_monitor->priv->mtab_volumes; l != NULL; l = l->next) {
- volume = l->data;
-- if (volume->priv->unix_device == device) {
-+ if (volume->priv->unix_device == device &&
-+ volume->priv->filesystem_type &&
-+ strcmp (volume->priv->filesystem_type, "lofs")) {
- res = gnome_vfs_volume_ref (volume);
- break;
- }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-08-trash-files-from-different-filesystem.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,23 @@
+diff -ur gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c
+--- gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c 2006-08-21 14:49:48.000000000 +0000
++++ ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c 2006-10-20 15:28:26.367491000 +0000
+@@ -2390,8 +2390,8 @@
+ merge_source_uri_list = NULL;
+ merge_target_uri_list = NULL;
+
+- if ((xfer_options & GNOME_VFS_XFER_USE_UNIQUE_NAMES) == 0) {
+- /* see if moved files are on the same file system so that we decide to do
++ /* if ((xfer_options & GNOME_VFS_XFER_USE_UNIQUE_NAMES) == 0) {
++ * see if moved files are on the same file system so that we decide to do
+ * a simple move or have to do a copy/remove
+ */
+ for (source_uri = source_uri_list, target_uri = target_uri_list;
+@@ -2410,7 +2410,7 @@
+
+ move &= same_fs;
+ }
+- }
++ /*}*/
+
+ if (target_dir_uri != NULL) {
+ gnome_vfs_uri_unref (target_dir_uri);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-09-socks-version.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,20 @@
+--- gnome-vfs-2.6.0/schemas/system_http_proxy.schemas.in 2005-02-04 15:56:04.772976688 +0530
++++ gnome-vfs-2.6.0-new/schemas/system_http_proxy.schemas.in 2005-02-04 16:57:06.661285048 +0530
+@@ -170,6 +170,17 @@
+ </locale>
+ </schema>
+ <schema>
++ <key>/schemas/system/proxy/socks_version</key>
++ <applyto>/system/proxy/socks_version</applyto>
++ <owner>gnome-vfs</owner>
++ <type>int</type>
++ <default>5</default>
++ <locale name="C">
++ <short>SOCKS version</short>
++ <long>The SOCKS version of the proxy server</long>
++ </locale>
++ </schema>
++ <schema>
+ <key>/schemas/system/proxy/gopher_host</key>
+ <applyto>/system/proxy/gopher_host</applyto>
+ <owner>gnome</owner>
--- a/patches/gnome-vfs-09-trash-files-from-different-filesystem.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-diff -ur gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c
---- gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c 2006-08-21 14:49:48.000000000 +0000
-+++ ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-xfer.c 2006-10-20 15:28:26.367491000 +0000
-@@ -2390,8 +2390,8 @@
- merge_source_uri_list = NULL;
- merge_target_uri_list = NULL;
-
-- if ((xfer_options & GNOME_VFS_XFER_USE_UNIQUE_NAMES) == 0) {
-- /* see if moved files are on the same file system so that we decide to do
-+ /* if ((xfer_options & GNOME_VFS_XFER_USE_UNIQUE_NAMES) == 0) {
-+ * see if moved files are on the same file system so that we decide to do
- * a simple move or have to do a copy/remove
- */
- for (source_uri = source_uri_list, target_uri = target_uri_list;
-@@ -2410,7 +2410,7 @@
-
- move &= same_fs;
- }
-- }
-+ /*}*/
-
- if (target_dir_uri != NULL) {
- gnome_vfs_uri_unref (target_dir_uri);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-10-audio-cd-show-icon.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,31 @@
+diff -ur gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
+--- gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2006-10-20 15:36:40.235990000 +0000
++++ ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2006-10-20 15:38:58.945481000 +0000
+@@ -934,6 +934,11 @@
+ vol->priv->device_type = GNOME_VFS_DEVICE_TYPE_HARDDRIVE;
+ }
+
++ /* Nautilus is not refreshing the desktop because floppy and cd devices are mounted as subfs
++ * So we dont want to show different label for different media devices.
++ * Let icon represent drive and not the media. For more info, please see #6228176
++ */
++#if 0
+ if (vol->priv->device_type == GNOME_VFS_DEVICE_TYPE_CDROM) {
+ fd = 0;
+ disctype = _gnome_vfs_get_cdrom_type (mount->device_path, &fd);
+@@ -965,6 +970,7 @@
+ close (fd);
+ }
+ }
++#endif
+
+ if (display_name == NULL) {
+ display_name = make_volume_name_from_path_and_fs (mount->mount_path, mount->filesystem_type);
+@@ -990,6 +996,7 @@
+ vol->priv->is_user_visible = 0;
+ switch (vol->priv->device_type) {
+ case GNOME_VFS_DEVICE_TYPE_CDROM:
++ case GNOME_VFS_DEVICE_TYPE_AUDIO_CD:
+ case GNOME_VFS_DEVICE_TYPE_FLOPPY:
+ case GNOME_VFS_DEVICE_TYPE_ZIP:
+ case GNOME_VFS_DEVICE_TYPE_JAZ:
--- a/patches/gnome-vfs-10-socks-version.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
---- gnome-vfs-2.6.0/schemas/system_http_proxy.schemas.in 2005-02-04 15:56:04.772976688 +0530
-+++ gnome-vfs-2.6.0-new/schemas/system_http_proxy.schemas.in 2005-02-04 16:57:06.661285048 +0530
-@@ -170,6 +170,17 @@
- </locale>
- </schema>
- <schema>
-+ <key>/schemas/system/proxy/socks_version</key>
-+ <applyto>/system/proxy/socks_version</applyto>
-+ <owner>gnome-vfs</owner>
-+ <type>int</type>
-+ <default>5</default>
-+ <locale name="C">
-+ <short>SOCKS version</short>
-+ <long>The SOCKS version of the proxy server</long>
-+ </locale>
-+ </schema>
-+ <schema>
- <key>/schemas/system/proxy/gopher_host</key>
- <applyto>/system/proxy/gopher_host</applyto>
- <owner>gnome</owner>
--- a/patches/gnome-vfs-11-audio-cd-show-icon.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-diff -ur gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
---- gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2006-10-20 15:36:40.235990000 +0000
-+++ ../SUNWgnome-vfs-2.16.1.hacked/gnome-vfs-2.16.1/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2006-10-20 15:38:58.945481000 +0000
-@@ -934,6 +934,11 @@
- vol->priv->device_type = GNOME_VFS_DEVICE_TYPE_HARDDRIVE;
- }
-
-+ /* Nautilus is not refreshing the desktop because floppy and cd devices are mounted as subfs
-+ * So we dont want to show different label for different media devices.
-+ * Let icon represent drive and not the media. For more info, please see #6228176
-+ */
-+#if 0
- if (vol->priv->device_type == GNOME_VFS_DEVICE_TYPE_CDROM) {
- fd = 0;
- disctype = _gnome_vfs_get_cdrom_type (mount->device_path, &fd);
-@@ -965,6 +970,7 @@
- close (fd);
- }
- }
-+#endif
-
- if (display_name == NULL) {
- display_name = make_volume_name_from_path_and_fs (mount->mount_path, mount->filesystem_type);
-@@ -990,6 +996,7 @@
- vol->priv->is_user_visible = 0;
- switch (vol->priv->device_type) {
- case GNOME_VFS_DEVICE_TYPE_CDROM:
-+ case GNOME_VFS_DEVICE_TYPE_AUDIO_CD:
- case GNOME_VFS_DEVICE_TYPE_FLOPPY:
- case GNOME_VFS_DEVICE_TYPE_ZIP:
- case GNOME_VFS_DEVICE_TYPE_JAZ:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-11-trash-skip-copy.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,50 @@
+--- gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-xfer.c 2005-04-13 09:09:29.000000000 +0530
++++ archana-gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-xfer.c 2005-04-13 10:41:54.819357496 +0530
+@@ -2115,9 +2115,36 @@ gnome_vfs_xfer_uri_internal (const GList
+ source_uri != NULL;
+ source_uri = source_uri->next, target_uri = target_uri->next) {
+ gboolean same_fs;
++ gboolean is_local;
++ char *trash_dir;
++ GnomeVFSURI *trash_uri;
++ GnomeVFSFileInfo *file_info;
+
+ g_assert (target_dir_uri != NULL);
+
++ /* For local uris, don't set the move option to copy/remove where remove
++ * can't be done
++ */
++ file_info = gnome_vfs_file_info_new ();
++
++ trash_dir = g_strconcat (g_get_home_dir (), "/.Trash", NULL);
++ trash_uri = gnome_vfs_uri_new (trash_dir);
++
++ result = gnome_vfs_get_file_info_uri ((GnomeVFSURI *)(source_uri->data),
++ file_info,
++ GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS);
++
++ is_local = gnome_vfs_uri_is_local ((GnomeVFSURI *)(source_uri->data));
++
++ if (result == GNOME_VFS_OK && ! strcmp (target_dir_uri->text, trash_uri->text)) {
++ if (is_local && (file_info->permissions & GNOME_VFS_PERM_ACCESS_WRITABLE) != 0) {
++ goto change_operation_move;
++ }
++ else {
++ goto dont_change_operation_move;
++ }
++ }
++change_operation_move:
+ result = gnome_vfs_check_same_fs_uris ((GnomeVFSURI *)source_uri->data,
+ target_dir_uri, &same_fs);
+
+@@ -2126,6 +2153,10 @@ gnome_vfs_xfer_uri_internal (const GList
+ }
+
+ move &= same_fs;
++dont_change_operation_move:
++ g_free (trash_dir);
++ gnome_vfs_uri_unref (trash_uri);
++ gnome_vfs_file_info_unref (file_info);
+ }
+ /*}*/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-12-login_tty.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,19 @@
+--- gnome-vfs-2.13.3/libgnomevfs/gnome-vfs-pty.c.orig Wed Dec 21 15:13:34 2005
++++ gnome-vfs-2.13.3/libgnomevfs/gnome-vfs-pty.c Wed Dec 21 15:19:31 2005
+@@ -307,6 +307,8 @@
+ }
+
+ #ifdef HAVE_UTMP_H
++/* Solaris doesn't have login_tty. It uses utmpx. */
++#if !defined(sun) || !defined(__SVR4)
+ /* This sets stdin, stdout, stderr to the socket */
+ if (login && login_tty (fd) == -1) {
+ g_printerr ("mount child process login_tty failed: %s\n", strerror (errno));
+@@ -313,6 +315,7 @@
+ return -1;
+ }
+ #endif
++#endif
+
+ /* Signal to the parent that we've finished setting things up by
+ * sending an arbitrary byte over the status pipe and waiting for
--- a/patches/gnome-vfs-12-trash-skip-copy.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
---- gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-xfer.c 2005-04-13 09:09:29.000000000 +0530
-+++ archana-gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-xfer.c 2005-04-13 10:41:54.819357496 +0530
-@@ -2115,9 +2115,36 @@ gnome_vfs_xfer_uri_internal (const GList
- source_uri != NULL;
- source_uri = source_uri->next, target_uri = target_uri->next) {
- gboolean same_fs;
-+ gboolean is_local;
-+ char *trash_dir;
-+ GnomeVFSURI *trash_uri;
-+ GnomeVFSFileInfo *file_info;
-
- g_assert (target_dir_uri != NULL);
-
-+ /* For local uris, don't set the move option to copy/remove where remove
-+ * can't be done
-+ */
-+ file_info = gnome_vfs_file_info_new ();
-+
-+ trash_dir = g_strconcat (g_get_home_dir (), "/.Trash", NULL);
-+ trash_uri = gnome_vfs_uri_new (trash_dir);
-+
-+ result = gnome_vfs_get_file_info_uri ((GnomeVFSURI *)(source_uri->data),
-+ file_info,
-+ GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS);
-+
-+ is_local = gnome_vfs_uri_is_local ((GnomeVFSURI *)(source_uri->data));
-+
-+ if (result == GNOME_VFS_OK && ! strcmp (target_dir_uri->text, trash_uri->text)) {
-+ if (is_local && (file_info->permissions & GNOME_VFS_PERM_ACCESS_WRITABLE) != 0) {
-+ goto change_operation_move;
-+ }
-+ else {
-+ goto dont_change_operation_move;
-+ }
-+ }
-+change_operation_move:
- result = gnome_vfs_check_same_fs_uris ((GnomeVFSURI *)source_uri->data,
- target_dir_uri, &same_fs);
-
-@@ -2126,6 +2153,10 @@ gnome_vfs_xfer_uri_internal (const GList
- }
-
- move &= same_fs;
-+dont_change_operation_move:
-+ g_free (trash_dir);
-+ gnome_vfs_uri_unref (trash_uri);
-+ gnome_vfs_file_info_unref (file_info);
- }
- /*}*/
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-13-krb5-config-no-gssapi.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,13 @@
+--- gnome-vfs-2.14.1/configure.in.orig 2006-05-02 08:04:46.942084000 +0100
++++ gnome-vfs-2.14.1/configure.in 2006-05-02 08:06:00.696868000 +0100
+@@ -432,8 +432,8 @@
+ AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin)
+
+ if test "x$KRB5_CONFIG" != "xnone"; then
+- GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`"
+- GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`"
++ GSSAPI_LIBS="`${KRB5_CONFIG} --libs`"
++ GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags`"
+
+ saved_CPPFLAGS="$CPPFLAGS"
+ saved_LIBS="$LIBS"
--- a/patches/gnome-vfs-13-login_tty.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
---- gnome-vfs-2.13.3/libgnomevfs/gnome-vfs-pty.c.orig Wed Dec 21 15:13:34 2005
-+++ gnome-vfs-2.13.3/libgnomevfs/gnome-vfs-pty.c Wed Dec 21 15:19:31 2005
-@@ -307,6 +307,8 @@
- }
-
- #ifdef HAVE_UTMP_H
-+/* Solaris doesn't have login_tty. It uses utmpx. */
-+#if !defined(sun) || !defined(__SVR4)
- /* This sets stdin, stdout, stderr to the socket */
- if (login && login_tty (fd) == -1) {
- g_printerr ("mount child process login_tty failed: %s\n", strerror (errno));
-@@ -313,6 +315,7 @@
- return -1;
- }
- #endif
-+#endif
-
- /* Signal to the parent that we've finished setting things up by
- * sending an arbitrary byte over the status pipe and waiting for
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-14-hidden.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,51 @@
+--- gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job.h-orig 2006-05-29 17:33:56.956034000 -0500
++++ gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job.h 2006-05-29 17:36:19.653925000 -0500
+@@ -413,20 +413,27 @@ struct GnomeVFSJob {
+ int priority;
+ };
+
++G_GNUC_INTERNAL
+ GnomeVFSJob *_gnome_vfs_job_new (GnomeVFSOpType type,
+ int priority,
+ GFunc callback,
+- gpointer callback_data) G_GNUC_INTERNAL;
+-void _gnome_vfs_job_destroy (GnomeVFSJob *job) G_GNUC_INTERNAL;
++ gpointer callback_data);
++G_GNUC_INTERNAL
++void _gnome_vfs_job_destroy (GnomeVFSJob *job);
++G_GNUC_INTERNAL
+ void _gnome_vfs_job_set (GnomeVFSJob *job,
+ GnomeVFSOpType type,
+ GFunc callback,
+- gpointer callback_data) G_GNUC_INTERNAL;
+-void _gnome_vfs_job_go (GnomeVFSJob *job) G_GNUC_INTERNAL;
+-void _gnome_vfs_job_execute (GnomeVFSJob *job) G_GNUC_INTERNAL;
+-void _gnome_vfs_job_module_cancel (GnomeVFSJob *job) G_GNUC_INTERNAL;
++ gpointer callback_data);
++G_GNUC_INTERNAL
++void _gnome_vfs_job_go (GnomeVFSJob *job);
++G_GNUC_INTERNAL
++void _gnome_vfs_job_execute (GnomeVFSJob *job);
++G_GNUC_INTERNAL
++void _gnome_vfs_job_module_cancel (GnomeVFSJob *job);
+ int gnome_vfs_job_get_count (void);
+
+-gboolean _gnome_vfs_job_complete (GnomeVFSJob *job) G_GNUC_INTERNAL;
++G_GNUC_INTERNAL
++gboolean _gnome_vfs_job_complete (GnomeVFSJob *job);
+
+ #endif /* GNOME_VFS_JOB_H */
+--- gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job-queue.h-orig 2006-05-29 17:34:06.085485000 -0500
++++ gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job-queue.h 2006-05-29 17:34:42.138020000 -0500
+@@ -28,8 +28,8 @@
+
+ #include "gnome-vfs-job.h"
+
+-void _gnome_vfs_job_queue_init (void) G_GNUC_INTERNAL;
+-void _gnome_vfs_job_queue_shutdown (void) G_GNUC_INTERNAL;
+-gboolean _gnome_vfs_job_schedule (GnomeVFSJob *job) G_GNUC_INTERNAL;
++G_GNUC_INTERNAL void _gnome_vfs_job_queue_init (void);
++G_GNUC_INTERNAL void _gnome_vfs_job_queue_shutdown (void);
++G_GNUC_INTERNAL gboolean _gnome_vfs_job_schedule (GnomeVFSJob *job);
+
+ #endif /* GNOME_VFS_JOB_QUEUE_H */
--- a/patches/gnome-vfs-14-krb5-config-no-gssapi.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
---- gnome-vfs-2.14.1/configure.in.orig 2006-05-02 08:04:46.942084000 +0100
-+++ gnome-vfs-2.14.1/configure.in 2006-05-02 08:06:00.696868000 +0100
-@@ -432,8 +432,8 @@
- AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin)
-
- if test "x$KRB5_CONFIG" != "xnone"; then
-- GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`"
-- GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`"
-+ GSSAPI_LIBS="`${KRB5_CONFIG} --libs`"
-+ GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags`"
-
- saved_CPPFLAGS="$CPPFLAGS"
- saved_LIBS="$LIBS"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-vfs-15-acl-permissions.diff Tue Nov 07 14:55:35 2006 +0000
@@ -0,0 +1,408 @@
+--- gnome-vfs-2.15.92/modules/file-method.c 2006-08-21 15:47:56.000000000 +0100
++++ gnome-vfs-2.15.92.fixed/modules/file-method.c 2006-08-31 17:54:34.578508000 +0100
+@@ -857,6 +857,10 @@
+ }
+ #endif
+
++ if (file_info->acl) {
++ get_access_info_acl (file_info, full_name);
++ }
++
+ file_info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_ACCESS;
+ }
+
+--- gnome-vfs-2.15.92/modules/file-method-acl.h 2006-06-08 13:52:36.000000000 +0100
++++ gnome-vfs-2.15.92.fixed/modules/file-method-acl.h 2006-08-31 17:49:22.933449000 +0100
+@@ -43,6 +43,9 @@
+ const GnomeVFSFileInfo *info,
+ GnomeVFSContext *context);
+
++void get_access_info_acl (GnomeVFSFileInfo *info,
++ const gchar *path);
++
+ G_END_DECLS
+
+
+--- gnome-vfs-2.15.92/modules/file-method-acl.c 2006-08-07 09:16:27.000000000 +0100
++++ gnome-vfs-2.15.92.fixed/modules/file-method-acl.c 2006-08-31 20:32:56.095039000 +0100
+@@ -1013,3 +1013,232 @@
+ }
+
+
++
++
++
++#ifndef HAVE_GETPWNAM_R
++G_LOCK_DEFINE (getpwnam_lock);
++#endif
++
++static int
++secure_getpwnam (const char *name, struct passwd *pwbuf, char *buf, size_t buflen)
++{
++#ifndef HAVE_GETPWNAM_R
++ size_t pw_name_len = 0;
++ size_t pw_passwd_len = 0;
++ size_t pw_gecos_len = 0;
++ size_t pw_dir_len = 0;
++ size_t pw_shell_len = 0;
++ char *ptr;
++ struct passwd *tmp;
++
++ G_LOCK(getpwnam_lock);
++
++ tmp = getpwnam (name);
++ if (tmp == NULL)
++ return errno;
++
++ if (tmp->pw_name) pw_name_len = strlen(tmp->pw_name);
++ if (tmp->pw_passwd) pw_passwd_len = strlen(tmp->pw_passwd);
++ if (tmp->pw_gecos) pw_gecos_len = strlen(tmp->pw_gecos);
++ if (tmp->pw_dir) pw_dir_len = strlen(tmp->pw_dir);
++ if (tmp->pw_shell) pw_shell_len = strlen(tmp->pw_shell);
++
++ if ((pw_name_len + pw_passwd_len +
++ pw_gecos_len + pw_dir_len + pw_shell_len) > buflen)
++ return ERANGE;
++
++ memset (buf, 0, buflen);
++ ptr = buf;
++
++
++
++ if (tmp->pw_name) {
++ memcpy (ptr, tmp->pw_name, pw_name_len);
++ pwbuf->pw_name = ptr;
++ ptr += pw_name_len + 1;
++ }
++
++ if (tmp->pw_passwd) {
++ memcpy (ptr, tmp->pw_passwd, pw_passwd_len);
++ pwbuf->pw_passwd = ptr;
++ ptr += pw_passwd_len + 1;
++ }
++
++ if (tmp->pw_gecos) {
++ memcpy (ptr, tmp->pw_gecos, pw_gecos_len);
++ pwbuf->pw_gecos = ptr;
++ ptr += pw_gecos_len + 1;
++ }
++
++ if (tmp->pw_dir) {
++ memcpy (ptr, tmp->pw_dir, pw_dir_len);
++ pwbuf->pw_dir = ptr;
++ ptr += pw_dir_len + 1;
++ }
++
++ if (tmp->pw_shell) {
++ memcpy (ptr, tmp->pw_shell, pw_shell_len);
++ pwbuf->pw_shell = ptr;
++ ptr += pw_shell_len + 1;
++ }
++
++ G_UNLOCK(getpwnam_lock);
++ return 0;
++
++#elif HAVE_GETPWNAM_R_5
++ struct passwd *tmp;
++
++ return getpwnam_r (name, pwbuf, buf, buflen, &tmp);
++
++#elif HAVE_GETPWNAM_R_4
++
++ return getpwnam_r (name, pwbuf, buf, buflen);
++#endif
++
++ return 0;
++}
++
++
++
++
++#ifndef HAVE_GETGRNAM_R
++G_LOCK_DEFINE (getgrnam_lock);
++#endif
++
++static int
++secure_getgrnam (const char *name, struct group *grbuf, char *buf, size_t buflen)
++{
++#ifndef HAVE_GETGRNAM_R
++ size_t gr_name_len = 0;
++ size_t gr_passwd_len = 0;
++ char *ptr;
++ struct group *tmp;
++
++ G_LOCK(getgrnam_lock);
++
++ tmp = getgrnam (name);
++ if (tmp == NULL)
++ return errno;
++
++ if (tmp->gr_name) gr_name_len = strlen(tmp->gr_name);
++ if (tmp->gr_passwd) gr_passwd_len = strlen(tmp->gr_passwd);
++
++ if ((gr_name_len + gr_passwd_len) > buflen)
++ return ERANGE;
++
++ memset (buf, 0, buflen);
++ ptr = buf;
++
++ grbuf->gr_gid = tmp->gr_gid;
++
++ if (tmp->gr_name) {
++ memcpy (ptr, tmp->gr_name, gr_name_len);
++ grbuf->gr_name = ptr;
++ ptr += gr_name_len + 1;
++ }
++
++ if (tmp->gr_passwd) {
++ memcpy (ptr, tmp->gr_passwd, gr_passwd_len);
++ grbuf->gr_passwd = ptr;
++ ptr += gr_passwd_len + 1;
++ }
++
++ // TODO: Duplicate char **tmp->gr_mem
++
++ G_UNLOCK(getgrnam_lock);
++ return 0;
++
++#elif HAVE_GETGRNAM_R_5
++ struct group *tmp;
++
++ return getgrnam_r (name, grbuf, buf, buflen, &tmp);
++
++#elif HAVE_GETGRNAM_R_4
++
++ return getgrnam_r (name, grbuf, buf, buflen);
++#endif
++
++ return 0;
++}
++
++void
++get_access_info_acl (GnomeVFSFileInfo *file_info,
++ const gchar *full_name)
++{
++ GList *acls, *iter;
++ GnomeVFSACL *acl;
++
++ acls = gnome_vfs_acl_get_ace_list (file_info->acl);
++
++ for (iter = acls; iter; iter = iter->next) {
++ int i, re;
++ const char *id;
++ uid_t uid;
++ gid_t gid;
++ struct group *group;
++ GnomeVFSACE *ace;
++ int sup_groups_num;
++ gid_t sup_groups[NGROUPS_MAX];
++ struct passwd *passwd;
++ struct passwd pwd;
++ struct group grp;
++ char buf[1024];
++
++ ace = iter->data;
++
++ id = gnome_vfs_ace_get_id (ace);
++ if (id == NULL) continue;
++
++ /* User */
++ re = secure_getpwnam (id, &pwd, buf, 1024);
++ if (re == 0) {
++ uid = passwd->pw_uid;
++ } else {
++ errno = 0;
++ uid = atoi (id);
++ if (errno != 0)
++ continue;
++ }
++
++ /* Group */
++ group = secure_getgrnam (id, &grp, buf, 1024);
++ if (group != NULL) {
++ gid = group->gr_gid;
++ } else {
++ errno = 0;
++ gid = atoi (id);
++ if (errno != 0)
++ continue;
++ }
++
++ /* Suplementary groups */
++ sup_groups_num = getgroups(NGROUPS_MAX, sup_groups);
++
++ if ((file_info->uid == uid) ||
++ (file_info->gid == gid))
++ {
++ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_READ))
++ file_info->permissions |= GNOME_VFS_PERM_ACCESS_READABLE;
++ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_WRITE))
++ file_info->permissions |= GNOME_VFS_PERM_ACCESS_WRITABLE;
++ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_EXECUTE))
++ file_info->permissions |= GNOME_VFS_PERM_ACCESS_EXECUTABLE;
++ }
++
++
++ for (i = 0; i < sup_groups_num; i++) {
++ if (gid == sup_groups[i]) {
++ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_READ))
++ file_info->permissions |= GNOME_VFS_PERM_ACCESS_READABLE;
++ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_WRITE))
++ file_info->permissions |= GNOME_VFS_PERM_ACCESS_WRITABLE;
++ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_EXECUTE))
++ file_info->permissions |= GNOME_VFS_PERM_ACCESS_EXECUTABLE;
++ }
++ }
++ }
++
++ gnome_vfs_acl_free_ace_list (acls);
++}
++
+--- gnome-vfs-2.15.92/configure.in 2006-08-31 17:47:31.010275000 +0100
++++ gnome-vfs-2.15.92.fixed/configure.in 2006-08-31 17:49:23.797938000 +0100
+@@ -1092,52 +1092,10 @@
+ AC_CHECK_FUNCS(acl_extended_file)
+
+ AC_CHECK_HEADERS([pwd.h])
+- if test "$ac_cv_header_pwd_h" = "yes"; then
+- AC_CACHE_CHECK([for posix getpwuid_r],
+- ac_cv_func_posix_getpwuid_r,
+- [AC_TRY_RUN([
+-#include <errno.h>
+-#include <pwd.h>
+-int main () {
+- char buffer[10000];
+- struct passwd pwd, *pwptr = &pwd;
+- int error;
+- errno = 0;
+- error = getpwuid_r (0, &pwd, buffer,
+- sizeof (buffer), &pwptr);
+- return (error < 0 && errno == ENOSYS)
+- || error == ENOSYS;
+-} ],
+- [ac_cv_func_posix_getpwuid_r=yes],
+- [ac_cv_func_posix_getpwuid_r=no])])
+- dnl GLIB_ASSERT_SET(ac_cv_func_posix_getpwuid_r)
+- if test "$ac_cv_func_posix_getpwuid_r" = yes; then
+- AC_DEFINE(HAVE_POSIX_GETPWUID_R,1,
+- [Have POSIX function getpwuid_r])
+- else
+- AC_CACHE_CHECK([for nonposix getpwuid_r],
+- ac_cv_func_nonposix_getpwuid_r,
+- [AC_TRY_LINK([#include <pwd.h>],
+- [char buffer[10000];
+- struct passwd pwd;
+- getpwuid_r (0, &pwd, buffer,
+- sizeof (buffer));],
+- [ac_cv_func_nonposix_getpwuid_r=yes],
+- [ac_cv_func_nonposix_getpwuid_r=no])])
+- dnl GLIB_ASSERT_SET(ac_cv_func_nonposix_getpwuid_r)
+- if test "$ac_cv_func_nonposix_getpwuid_r" = yes; then
+- AC_DEFINE(HAVE_NONPOSIX_GETPWUID_R,1,
+- [Have non-POSIX function getpwuid_r])
+- fi
+- fi
+- fi
+-
+- AC_CHECK_HEADERS([grp.h])
+-
+- AC_CHECK_FUNCS(getgrgid_r)
+- AC_CHECK_FUNCS(getgrnam_r)
+- AC_CHECK_FUNCS(getpwnam_r)
+-
++ FW_CHECK_PWD
++
++ AC_CHECK_HEADERS([grp.h])
++ FW_CHECK_GRP
+ fi
+
+ AC_SUBST(ACL_LIBS)
+--- gnome-vfs-2.15.92/acinclude.m4 2005-12-02 18:00:25.000000000 +0000
++++ gnome-vfs-2.15.92.fixed/acinclude.m4 2006-08-31 17:49:23.592022000 +0100
+@@ -554,5 +554,85 @@
+
+ ])
+
+-
+ dnl end of neon macros
++
++
++dnl
++dnl checks for password entry functions and header files
++dnl
++AC_DEFUN([FW_CHECK_PWD],
++[
++
++HAVE_GETPWNAM_R=""
++
++AC_MSG_CHECKING(for getpwnam_r with 5 parameters)
++AC_TRY_COMPILE([#include <pwd.h>
++#include <stdlib.h>],
++getpwnam_r(NULL,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETPWNAM_R_5,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1,Some systems have getpwnam_r) AC_MSG_RESULT(yes); HAVE_GETPWNAM_R="yes", AC_MSG_RESULT(no))
++
++if ( test -z "$HAVE_GETPWNAM_R" )
++then
++ AC_MSG_CHECKING(for getpwnam_r with 4 parameters)
++ AC_TRY_COMPILE([#include <pwd.h>
++#include <stdlib.h>],
++getpwnam_r(NULL,NULL,NULL,0);,AC_DEFINE(HAVE_GETPWNAM_R_4,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1,Some systems have getpwnam_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
++fi
++
++HAVE_GETPWUID_R=""
++
++AC_MSG_CHECKING(for getpwuid_r with 5 parameters)
++AC_TRY_COMPILE([#include <pwd.h>
++#include <stdlib.h>],
++getpwuid_r(0,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETPWUID_R_5,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Some systems have getpwuid_r) AC_MSG_RESULT(yes); HAVE_GETPWUID_R="yes", AC_MSG_RESULT(no))
++
++if ( test -z "$HAVE_GETPWUID_R" )
++then
++ AC_MSG_CHECKING(for getpwuid_r with 4 parameters)
++ AC_TRY_COMPILE([#include <pwd.h>
++#include <stdlib.h>],
++getpwuid_r(0,NULL,NULL,0);,AC_DEFINE(HAVE_GETPWUID_R_4,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Some systems have getpwuid_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
++fi
++
++])
++
++
++dnl
++dnl checks for group entry functions and header files
++dnl
++AC_DEFUN([FW_CHECK_GRP],
++[
++
++HAVE_GETGRNAM_R=""
++
++AC_MSG_CHECKING(for getgrnam_r with 5 parameters)
++AC_TRY_COMPILE([#include <grp.h>
++#include <stdlib.h>],
++getgrnam_r(NULL,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETGRNAM_R_5,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1,Some systems have getgrnam_r) AC_MSG_RESULT(yes); HAVE_GETGRNAM_R="yes", AC_MSG_RESULT(no))
++
++if ( test -z "$HAVE_GETGRNAM_R" )
++then
++ AC_MSG_CHECKING(for getgrnam_r with 4 parameters)
++ AC_TRY_COMPILE([#include <grp.h>
++#include <stdlib.h>],
++getgrnam_r(NULL,NULL,NULL,0);,AC_DEFINE(HAVE_GETGRNAM_R_4,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1,Some systems have getgrnam_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
++fi
++
++HAVE_GETGRGID_R=""
++
++AC_MSG_CHECKING(for getgrgid_r with 5 parameters)
++AC_TRY_COMPILE([#include <grp.h>
++#include <stdlib.h>],
++getgrgid_r(0,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETGRGID_R_5,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Some systems have getgrgid_r) AC_MSG_RESULT(yes); HAVE_GETGRGID_R="yes", AC_MSG_RESULT(no))
++
++if ( test -z "$HAVE_GETGRGID_R" )
++then
++ AC_MSG_CHECKING(for getgrgid_r with 4 parameters)
++ AC_TRY_COMPILE([#include <grp.h>
++#include <stdlib.h>],
++getgrgid_r(0,NULL,NULL,0);,AC_DEFINE(HAVE_GETGRGID_R_4,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Some systems have getgrgid_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
++fi
++
++])
++
++
++
--- a/patches/gnome-vfs-15-hidden.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
---- gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job.h-orig 2006-05-29 17:33:56.956034000 -0500
-+++ gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job.h 2006-05-29 17:36:19.653925000 -0500
-@@ -413,20 +413,27 @@ struct GnomeVFSJob {
- int priority;
- };
-
-+G_GNUC_INTERNAL
- GnomeVFSJob *_gnome_vfs_job_new (GnomeVFSOpType type,
- int priority,
- GFunc callback,
-- gpointer callback_data) G_GNUC_INTERNAL;
--void _gnome_vfs_job_destroy (GnomeVFSJob *job) G_GNUC_INTERNAL;
-+ gpointer callback_data);
-+G_GNUC_INTERNAL
-+void _gnome_vfs_job_destroy (GnomeVFSJob *job);
-+G_GNUC_INTERNAL
- void _gnome_vfs_job_set (GnomeVFSJob *job,
- GnomeVFSOpType type,
- GFunc callback,
-- gpointer callback_data) G_GNUC_INTERNAL;
--void _gnome_vfs_job_go (GnomeVFSJob *job) G_GNUC_INTERNAL;
--void _gnome_vfs_job_execute (GnomeVFSJob *job) G_GNUC_INTERNAL;
--void _gnome_vfs_job_module_cancel (GnomeVFSJob *job) G_GNUC_INTERNAL;
-+ gpointer callback_data);
-+G_GNUC_INTERNAL
-+void _gnome_vfs_job_go (GnomeVFSJob *job);
-+G_GNUC_INTERNAL
-+void _gnome_vfs_job_execute (GnomeVFSJob *job);
-+G_GNUC_INTERNAL
-+void _gnome_vfs_job_module_cancel (GnomeVFSJob *job);
- int gnome_vfs_job_get_count (void);
-
--gboolean _gnome_vfs_job_complete (GnomeVFSJob *job) G_GNUC_INTERNAL;
-+G_GNUC_INTERNAL
-+gboolean _gnome_vfs_job_complete (GnomeVFSJob *job);
-
- #endif /* GNOME_VFS_JOB_H */
---- gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job-queue.h-orig 2006-05-29 17:34:06.085485000 -0500
-+++ gnome-vfs-2.14.1/libgnomevfs/gnome-vfs-job-queue.h 2006-05-29 17:34:42.138020000 -0500
-@@ -28,8 +28,8 @@
-
- #include "gnome-vfs-job.h"
-
--void _gnome_vfs_job_queue_init (void) G_GNUC_INTERNAL;
--void _gnome_vfs_job_queue_shutdown (void) G_GNUC_INTERNAL;
--gboolean _gnome_vfs_job_schedule (GnomeVFSJob *job) G_GNUC_INTERNAL;
-+G_GNUC_INTERNAL void _gnome_vfs_job_queue_init (void);
-+G_GNUC_INTERNAL void _gnome_vfs_job_queue_shutdown (void);
-+G_GNUC_INTERNAL gboolean _gnome_vfs_job_schedule (GnomeVFSJob *job);
-
- #endif /* GNOME_VFS_JOB_QUEUE_H */
--- a/patches/gnome-vfs-16-acl-permissions.diff Tue Nov 07 14:48:11 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,408 +0,0 @@
---- gnome-vfs-2.15.92/modules/file-method.c 2006-08-21 15:47:56.000000000 +0100
-+++ gnome-vfs-2.15.92.fixed/modules/file-method.c 2006-08-31 17:54:34.578508000 +0100
-@@ -857,6 +857,10 @@
- }
- #endif
-
-+ if (file_info->acl) {
-+ get_access_info_acl (file_info, full_name);
-+ }
-+
- file_info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_ACCESS;
- }
-
---- gnome-vfs-2.15.92/modules/file-method-acl.h 2006-06-08 13:52:36.000000000 +0100
-+++ gnome-vfs-2.15.92.fixed/modules/file-method-acl.h 2006-08-31 17:49:22.933449000 +0100
-@@ -43,6 +43,9 @@
- const GnomeVFSFileInfo *info,
- GnomeVFSContext *context);
-
-+void get_access_info_acl (GnomeVFSFileInfo *info,
-+ const gchar *path);
-+
- G_END_DECLS
-
-
---- gnome-vfs-2.15.92/modules/file-method-acl.c 2006-08-07 09:16:27.000000000 +0100
-+++ gnome-vfs-2.15.92.fixed/modules/file-method-acl.c 2006-08-31 20:32:56.095039000 +0100
-@@ -1013,3 +1013,232 @@
- }
-
-
-+
-+
-+
-+#ifndef HAVE_GETPWNAM_R
-+G_LOCK_DEFINE (getpwnam_lock);
-+#endif
-+
-+static int
-+secure_getpwnam (const char *name, struct passwd *pwbuf, char *buf, size_t buflen)
-+{
-+#ifndef HAVE_GETPWNAM_R
-+ size_t pw_name_len = 0;
-+ size_t pw_passwd_len = 0;
-+ size_t pw_gecos_len = 0;
-+ size_t pw_dir_len = 0;
-+ size_t pw_shell_len = 0;
-+ char *ptr;
-+ struct passwd *tmp;
-+
-+ G_LOCK(getpwnam_lock);
-+
-+ tmp = getpwnam (name);
-+ if (tmp == NULL)
-+ return errno;
-+
-+ if (tmp->pw_name) pw_name_len = strlen(tmp->pw_name);
-+ if (tmp->pw_passwd) pw_passwd_len = strlen(tmp->pw_passwd);
-+ if (tmp->pw_gecos) pw_gecos_len = strlen(tmp->pw_gecos);
-+ if (tmp->pw_dir) pw_dir_len = strlen(tmp->pw_dir);
-+ if (tmp->pw_shell) pw_shell_len = strlen(tmp->pw_shell);
-+
-+ if ((pw_name_len + pw_passwd_len +
-+ pw_gecos_len + pw_dir_len + pw_shell_len) > buflen)
-+ return ERANGE;
-+
-+ memset (buf, 0, buflen);
-+ ptr = buf;
-+
-+
-+
-+ if (tmp->pw_name) {
-+ memcpy (ptr, tmp->pw_name, pw_name_len);
-+ pwbuf->pw_name = ptr;
-+ ptr += pw_name_len + 1;
-+ }
-+
-+ if (tmp->pw_passwd) {
-+ memcpy (ptr, tmp->pw_passwd, pw_passwd_len);
-+ pwbuf->pw_passwd = ptr;
-+ ptr += pw_passwd_len + 1;
-+ }
-+
-+ if (tmp->pw_gecos) {
-+ memcpy (ptr, tmp->pw_gecos, pw_gecos_len);
-+ pwbuf->pw_gecos = ptr;
-+ ptr += pw_gecos_len + 1;
-+ }
-+
-+ if (tmp->pw_dir) {
-+ memcpy (ptr, tmp->pw_dir, pw_dir_len);
-+ pwbuf->pw_dir = ptr;
-+ ptr += pw_dir_len + 1;
-+ }
-+
-+ if (tmp->pw_shell) {
-+ memcpy (ptr, tmp->pw_shell, pw_shell_len);
-+ pwbuf->pw_shell = ptr;
-+ ptr += pw_shell_len + 1;
-+ }
-+
-+ G_UNLOCK(getpwnam_lock);
-+ return 0;
-+
-+#elif HAVE_GETPWNAM_R_5
-+ struct passwd *tmp;
-+
-+ return getpwnam_r (name, pwbuf, buf, buflen, &tmp);
-+
-+#elif HAVE_GETPWNAM_R_4
-+
-+ return getpwnam_r (name, pwbuf, buf, buflen);
-+#endif
-+
-+ return 0;
-+}
-+
-+
-+
-+
-+#ifndef HAVE_GETGRNAM_R
-+G_LOCK_DEFINE (getgrnam_lock);
-+#endif
-+
-+static int
-+secure_getgrnam (const char *name, struct group *grbuf, char *buf, size_t buflen)
-+{
-+#ifndef HAVE_GETGRNAM_R
-+ size_t gr_name_len = 0;
-+ size_t gr_passwd_len = 0;
-+ char *ptr;
-+ struct group *tmp;
-+
-+ G_LOCK(getgrnam_lock);
-+
-+ tmp = getgrnam (name);
-+ if (tmp == NULL)
-+ return errno;
-+
-+ if (tmp->gr_name) gr_name_len = strlen(tmp->gr_name);
-+ if (tmp->gr_passwd) gr_passwd_len = strlen(tmp->gr_passwd);
-+
-+ if ((gr_name_len + gr_passwd_len) > buflen)
-+ return ERANGE;
-+
-+ memset (buf, 0, buflen);
-+ ptr = buf;
-+
-+ grbuf->gr_gid = tmp->gr_gid;
-+
-+ if (tmp->gr_name) {
-+ memcpy (ptr, tmp->gr_name, gr_name_len);
-+ grbuf->gr_name = ptr;
-+ ptr += gr_name_len + 1;
-+ }
-+
-+ if (tmp->gr_passwd) {
-+ memcpy (ptr, tmp->gr_passwd, gr_passwd_len);
-+ grbuf->gr_passwd = ptr;
-+ ptr += gr_passwd_len + 1;
-+ }
-+
-+ // TODO: Duplicate char **tmp->gr_mem
-+
-+ G_UNLOCK(getgrnam_lock);
-+ return 0;
-+
-+#elif HAVE_GETGRNAM_R_5
-+ struct group *tmp;
-+
-+ return getgrnam_r (name, grbuf, buf, buflen, &tmp);
-+
-+#elif HAVE_GETGRNAM_R_4
-+
-+ return getgrnam_r (name, grbuf, buf, buflen);
-+#endif
-+
-+ return 0;
-+}
-+
-+void
-+get_access_info_acl (GnomeVFSFileInfo *file_info,
-+ const gchar *full_name)
-+{
-+ GList *acls, *iter;
-+ GnomeVFSACL *acl;
-+
-+ acls = gnome_vfs_acl_get_ace_list (file_info->acl);
-+
-+ for (iter = acls; iter; iter = iter->next) {
-+ int i, re;
-+ const char *id;
-+ uid_t uid;
-+ gid_t gid;
-+ struct group *group;
-+ GnomeVFSACE *ace;
-+ int sup_groups_num;
-+ gid_t sup_groups[NGROUPS_MAX];
-+ struct passwd *passwd;
-+ struct passwd pwd;
-+ struct group grp;
-+ char buf[1024];
-+
-+ ace = iter->data;
-+
-+ id = gnome_vfs_ace_get_id (ace);
-+ if (id == NULL) continue;
-+
-+ /* User */
-+ re = secure_getpwnam (id, &pwd, buf, 1024);
-+ if (re == 0) {
-+ uid = passwd->pw_uid;
-+ } else {
-+ errno = 0;
-+ uid = atoi (id);
-+ if (errno != 0)
-+ continue;
-+ }
-+
-+ /* Group */
-+ group = secure_getgrnam (id, &grp, buf, 1024);
-+ if (group != NULL) {
-+ gid = group->gr_gid;
-+ } else {
-+ errno = 0;
-+ gid = atoi (id);
-+ if (errno != 0)
-+ continue;
-+ }
-+
-+ /* Suplementary groups */
-+ sup_groups_num = getgroups(NGROUPS_MAX, sup_groups);
-+
-+ if ((file_info->uid == uid) ||
-+ (file_info->gid == gid))
-+ {
-+ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_READ))
-+ file_info->permissions |= GNOME_VFS_PERM_ACCESS_READABLE;
-+ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_WRITE))
-+ file_info->permissions |= GNOME_VFS_PERM_ACCESS_WRITABLE;
-+ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_EXECUTE))
-+ file_info->permissions |= GNOME_VFS_PERM_ACCESS_EXECUTABLE;
-+ }
-+
-+
-+ for (i = 0; i < sup_groups_num; i++) {
-+ if (gid == sup_groups[i]) {
-+ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_READ))
-+ file_info->permissions |= GNOME_VFS_PERM_ACCESS_READABLE;
-+ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_WRITE))
-+ file_info->permissions |= GNOME_VFS_PERM_ACCESS_WRITABLE;
-+ if (gnome_vfs_ace_check_perm (ace,GNOME_VFS_ACL_EXECUTE))
-+ file_info->permissions |= GNOME_VFS_PERM_ACCESS_EXECUTABLE;
-+ }
-+ }
-+ }
-+
-+ gnome_vfs_acl_free_ace_list (acls);
-+}
-+
---- gnome-vfs-2.15.92/configure.in 2006-08-31 17:47:31.010275000 +0100
-+++ gnome-vfs-2.15.92.fixed/configure.in 2006-08-31 17:49:23.797938000 +0100
-@@ -1092,52 +1092,10 @@
- AC_CHECK_FUNCS(acl_extended_file)
-
- AC_CHECK_HEADERS([pwd.h])
-- if test "$ac_cv_header_pwd_h" = "yes"; then
-- AC_CACHE_CHECK([for posix getpwuid_r],
-- ac_cv_func_posix_getpwuid_r,
-- [AC_TRY_RUN([
--#include <errno.h>
--#include <pwd.h>
--int main () {
-- char buffer[10000];
-- struct passwd pwd, *pwptr = &pwd;
-- int error;
-- errno = 0;
-- error = getpwuid_r (0, &pwd, buffer,
-- sizeof (buffer), &pwptr);
-- return (error < 0 && errno == ENOSYS)
-- || error == ENOSYS;
--} ],
-- [ac_cv_func_posix_getpwuid_r=yes],
-- [ac_cv_func_posix_getpwuid_r=no])])
-- dnl GLIB_ASSERT_SET(ac_cv_func_posix_getpwuid_r)
-- if test "$ac_cv_func_posix_getpwuid_r" = yes; then
-- AC_DEFINE(HAVE_POSIX_GETPWUID_R,1,
-- [Have POSIX function getpwuid_r])
-- else
-- AC_CACHE_CHECK([for nonposix getpwuid_r],
-- ac_cv_func_nonposix_getpwuid_r,
-- [AC_TRY_LINK([#include <pwd.h>],
-- [char buffer[10000];
-- struct passwd pwd;
-- getpwuid_r (0, &pwd, buffer,
-- sizeof (buffer));],
-- [ac_cv_func_nonposix_getpwuid_r=yes],
-- [ac_cv_func_nonposix_getpwuid_r=no])])
-- dnl GLIB_ASSERT_SET(ac_cv_func_nonposix_getpwuid_r)
-- if test "$ac_cv_func_nonposix_getpwuid_r" = yes; then
-- AC_DEFINE(HAVE_NONPOSIX_GETPWUID_R,1,
-- [Have non-POSIX function getpwuid_r])
-- fi
-- fi
-- fi
--
-- AC_CHECK_HEADERS([grp.h])
--
-- AC_CHECK_FUNCS(getgrgid_r)
-- AC_CHECK_FUNCS(getgrnam_r)
-- AC_CHECK_FUNCS(getpwnam_r)
--
-+ FW_CHECK_PWD
-+
-+ AC_CHECK_HEADERS([grp.h])
-+ FW_CHECK_GRP
- fi
-
- AC_SUBST(ACL_LIBS)
---- gnome-vfs-2.15.92/acinclude.m4 2005-12-02 18:00:25.000000000 +0000
-+++ gnome-vfs-2.15.92.fixed/acinclude.m4 2006-08-31 17:49:23.592022000 +0100
-@@ -554,5 +554,85 @@
-
- ])
-
--
- dnl end of neon macros
-+
-+
-+dnl
-+dnl checks for password entry functions and header files
-+dnl
-+AC_DEFUN([FW_CHECK_PWD],
-+[
-+
-+HAVE_GETPWNAM_R=""
-+
-+AC_MSG_CHECKING(for getpwnam_r with 5 parameters)
-+AC_TRY_COMPILE([#include <pwd.h>
-+#include <stdlib.h>],
-+getpwnam_r(NULL,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETPWNAM_R_5,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1,Some systems have getpwnam_r) AC_MSG_RESULT(yes); HAVE_GETPWNAM_R="yes", AC_MSG_RESULT(no))
-+
-+if ( test -z "$HAVE_GETPWNAM_R" )
-+then
-+ AC_MSG_CHECKING(for getpwnam_r with 4 parameters)
-+ AC_TRY_COMPILE([#include <pwd.h>
-+#include <stdlib.h>],
-+getpwnam_r(NULL,NULL,NULL,0);,AC_DEFINE(HAVE_GETPWNAM_R_4,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1,Some systems have getpwnam_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-+fi
-+
-+HAVE_GETPWUID_R=""
-+
-+AC_MSG_CHECKING(for getpwuid_r with 5 parameters)
-+AC_TRY_COMPILE([#include <pwd.h>
-+#include <stdlib.h>],
-+getpwuid_r(0,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETPWUID_R_5,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Some systems have getpwuid_r) AC_MSG_RESULT(yes); HAVE_GETPWUID_R="yes", AC_MSG_RESULT(no))
-+
-+if ( test -z "$HAVE_GETPWUID_R" )
-+then
-+ AC_MSG_CHECKING(for getpwuid_r with 4 parameters)
-+ AC_TRY_COMPILE([#include <pwd.h>
-+#include <stdlib.h>],
-+getpwuid_r(0,NULL,NULL,0);,AC_DEFINE(HAVE_GETPWUID_R_4,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Some systems have getpwuid_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-+fi
-+
-+])
-+
-+
-+dnl
-+dnl checks for group entry functions and header files
-+dnl
-+AC_DEFUN([FW_CHECK_GRP],
-+[
-+
-+HAVE_GETGRNAM_R=""
-+
-+AC_MSG_CHECKING(for getgrnam_r with 5 parameters)
-+AC_TRY_COMPILE([#include <grp.h>
-+#include <stdlib.h>],
-+getgrnam_r(NULL,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETGRNAM_R_5,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1,Some systems have getgrnam_r) AC_MSG_RESULT(yes); HAVE_GETGRNAM_R="yes", AC_MSG_RESULT(no))
-+
-+if ( test -z "$HAVE_GETGRNAM_R" )
-+then
-+ AC_MSG_CHECKING(for getgrnam_r with 4 parameters)
-+ AC_TRY_COMPILE([#include <grp.h>
-+#include <stdlib.h>],
-+getgrnam_r(NULL,NULL,NULL,0);,AC_DEFINE(HAVE_GETGRNAM_R_4,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1,Some systems have getgrnam_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-+fi
-+
-+HAVE_GETGRGID_R=""
-+
-+AC_MSG_CHECKING(for getgrgid_r with 5 parameters)
-+AC_TRY_COMPILE([#include <grp.h>
-+#include <stdlib.h>],
-+getgrgid_r(0,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETGRGID_R_5,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Some systems have getgrgid_r) AC_MSG_RESULT(yes); HAVE_GETGRGID_R="yes", AC_MSG_RESULT(no))
-+
-+if ( test -z "$HAVE_GETGRGID_R" )
-+then
-+ AC_MSG_CHECKING(for getgrgid_r with 4 parameters)
-+ AC_TRY_COMPILE([#include <grp.h>
-+#include <stdlib.h>],
-+getgrgid_r(0,NULL,NULL,0);,AC_DEFINE(HAVE_GETGRGID_R_4,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Some systems have getgrgid_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-+fi
-+
-+])
-+
-+
-+