[Pkg-utopia-commits] r1107 - in packages/unstable/dbus/debian: . patches

Sjoerd Simons sjoerd at costa.debian.org
Wed Oct 25 09:27:20 UTC 2006


Author: sjoerd
Date: 2006-10-25 09:27:20 +0000 (Wed, 25 Oct 2006)
New Revision: 1107

Added:
   packages/unstable/dbus/debian/patches/20_dbus_uuid_world_readable.patch
Modified:
   packages/unstable/dbus/debian/changelog
Log:
* debian/patches/20_dbus_uuid_world_readable.patch
  + Added. Make the generated machine-id file world readable (from upstream
  CVS)

Modified: packages/unstable/dbus/debian/changelog
===================================================================
--- packages/unstable/dbus/debian/changelog	2006-10-25 09:04:00 UTC (rev 1106)
+++ packages/unstable/dbus/debian/changelog	2006-10-25 09:27:20 UTC (rev 1107)
@@ -18,8 +18,11 @@
   * debian/dbus.install: Include dbus-uuidgen and it's manpage
   * debian/libdbus-1-3.shlibs, debian/shlibs.local: Added. New symbols were
     added in this release.
+  * debian/patches/20_dbus_uuid_world_readable.patch
+    + Added. Make the generated machine-id file world readable (from upstream
+    CVS)
 
- -- Sjoerd Simons <sjoerd at debian.org>  Tue, 24 Oct 2006 11:27:18 +0200
+ -- Sjoerd Simons <sjoerd at debian.org>  Wed, 25 Oct 2006 11:26:32 +0200
 
 dbus (0.93-1) unstable; urgency=low
 

Added: packages/unstable/dbus/debian/patches/20_dbus_uuid_world_readable.patch
===================================================================
--- packages/unstable/dbus/debian/patches/20_dbus_uuid_world_readable.patch	                        (rev 0)
+++ packages/unstable/dbus/debian/patches/20_dbus_uuid_world_readable.patch	2006-10-25 09:27:20 UTC (rev 1107)
@@ -0,0 +1,103 @@
+Index: dbus/dbus-internals.c
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-internals.c,v
+retrieving revision 1.53
+retrieving revision 1.54
+diff -u -r1.53 -r1.54
+--- dbus/dbus-internals.c	20 Oct 2006 03:25:22 -0000	1.53
++++ dbus/dbus-internals.c	24 Oct 2006 20:25:01 -0000	1.54
+@@ -639,6 +639,8 @@
+   if (!_dbus_string_save_to_file (&encoded, filename, error))
+     goto error;
+ 
++  if (!_dbus_make_file_world_readable (filename, error))
++    goto error;
+ 
+   _dbus_string_free (&encoded);
+ 
+Index: dbus/dbus-sysdeps-unix.c
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps-unix.c,v
+retrieving revision 1.13
+retrieving revision 1.14
+diff -u -r1.13 -r1.14
+--- dbus/dbus-sysdeps-unix.c	21 Oct 2006 18:17:02 -0000	1.13
++++ dbus/dbus-sysdeps-unix.c	24 Oct 2006 20:25:01 -0000	1.14
+@@ -1802,6 +1802,33 @@
+   return retval;
+ }
+ 
++/** Makes the file readable by every user in the system.
++ *
++ * @param filename the filename
++ * @param error error location
++ * @returns #TRUE if the file's permissions could be changed.
++ */
++dbus_bool_t
++_dbus_make_file_world_readable(const DBusString *filename,
++                               DBusError *error)
++{
++  const char *filename_c;
++
++  _DBUS_ASSERT_ERROR_IS_CLEAR (error);
++
++  filename_c = _dbus_string_get_const_data (filename);
++  if (chmod (filename_c, 0644) == -1)
++    {
++      dbus_set_error (error,
++                      DBUS_ERROR_FAILED,
++                      "Could not change permissions of file %s: %s\n",
++                      filename_c,
++                      _dbus_strerror (errno));
++      return FALSE;
++    }
++  return TRUE;
++}
++
+ /** Creates the given file, failing if the file already exists.
+  *
+  * @param filename the filename
+@@ -2361,11 +2388,11 @@
+     }
+   
+   i = 0;
+-  argv[i] = DBUS_BINDIR "/dbus-launch";
++  argv[i] = "dbus-launch";
+   ++i;
+   argv[i] = "--autolaunch";
+   ++i;
+-  argv[i] = /* const cast */ (char*) _dbus_string_get_const_data (&uuid);
++  argv[i] = _dbus_string_get_data (&uuid);
+   ++i;
+   argv[i] = "--binary-syntax";
+   ++i;
+@@ -2423,10 +2450,9 @@
+       close (fd);
+       close (address_pipe[WRITE_END]);
+ 
+-      execv (argv[0], argv);
++      execv (DBUS_BINDIR "/dbus-launch", argv);
+ 
+       /* failed, try searching PATH */
+-      argv[0] = "dbus-launch";
+       execvp ("dbus-launch", argv);
+ 
+       /* still nothing, we failed */
+Index: dbus/dbus-sysdeps.h
+===================================================================
+RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.h,v
+retrieving revision 1.63
+retrieving revision 1.64
+diff -u -r1.63 -r1.64
+--- dbus/dbus-sysdeps.h	21 Oct 2006 23:09:18 -0000	1.63
++++ dbus/dbus-sysdeps.h	24 Oct 2006 20:25:01 -0000	1.64
+@@ -273,6 +273,9 @@
+                                        const DBusString *filename,
+                                        DBusError        *error);
+ 
++dbus_bool_t _dbus_make_file_world_readable   (const DBusString *filename,
++                                              DBusError *error);
++
+ dbus_bool_t    _dbus_create_file_exclusively (const DBusString *filename,
+                                               DBusError        *error);
+ dbus_bool_t    _dbus_delete_file             (const DBusString *filename,




More information about the Pkg-utopia-commits mailing list