Package: dbus-1
Version: 0.23.2-3
Severity: minor
Tags: patch

Because of an annoying minor spelling mistake in a couple of #define
lines, dbus uses the plain getpwnam rather than the re-entrant getpwnam_r.
The attached patch fixes this.

-- System Information:
Debian Release: 3.0
  APT prefers testing
  APT policy: (103, 'testing'), (102, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dbus-1 depends on:
ii  adduser                     3.62         Add and remove users and groups
ii  debianutils                 2.8.4        Miscellaneous utilities specific t
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libexpat1                   1.95.8-1     XML parsing C library - runtime li

-- no debconf information
diff -ur dbus-0.23.2/dbus/dbus-sysdeps.c dbus-0.23.2.old/dbus/dbus-sysdeps.c
--- dbus-0.23.2/dbus/dbus-sysdeps.c	Wed Jan 12 00:07:52 2005
+++ dbus-0.23.2.old/dbus/dbus-sysdeps.c	Tue Mar  1 03:25:02 2005
@@ -1422,7 +1422,7 @@
    * checks
    */
   
-#if defined (HAVE_POSIX_GETPWNAME_R) || defined (HAVE_NONPOSIX_GETPWNAME_R)
+#if defined (HAVE_POSIX_GETPWNAM_R) || defined (HAVE_NONPOSIX_GETPWNAM_R)
   {
     struct passwd *p;
     int result;
@@ -1430,8 +1430,8 @@
     struct passwd p_str;
 
     p = NULL;
-#ifdef HAVE_POSIX_GETPWNAME_R
-    if (uid >= 0)
+#ifdef HAVE_POSIX_GETPWNAM_R
+    if (uid != DBUS_UID_UNSET)
       result = getpwuid_r (uid, &p_str, buf, sizeof (buf),
                            &p);
     else
@@ -1443,7 +1443,7 @@
     else
       p = getpwnam_r (username_c, &p_str, buf, sizeof (buf));
     result = 0;
-#endif /* !HAVE_POSIX_GETPWNAME_R */
+#endif /* !HAVE_POSIX_GETPWNAM_R */
     if (result == 0 && p == &p_str)
       {
         if (!fill_user_info_from_passwd (p, info, error))
@@ -1658,7 +1658,7 @@
    * to add more configure checks.
    */
   
-#if defined (HAVE_POSIX_GETPWNAME_R) || defined (HAVE_NONPOSIX_GETPWNAME_R)
+#if defined (HAVE_POSIX_GETPWNAM_R) || defined (HAVE_NONPOSIX_GETPWNAM_R)
   {
     struct group *g;
     int result;
@@ -1666,7 +1666,7 @@
     struct group g_str;
 
     g = NULL;
-#ifdef HAVE_POSIX_GETPWNAME_R
+#ifdef HAVE_POSIX_GETPWNAM_R
 
     if (group_c_str)
       result = getgrnam_r (group_c_str, &g_str, buf, sizeof (buf),
@@ -1677,7 +1677,7 @@
 #else
     p = getgrnam_r (group_c_str, &g_str, buf, sizeof (buf));
     result = 0;
-#endif /* !HAVE_POSIX_GETPWNAME_R */
+#endif /* !HAVE_POSIX_GETPWNAM_R */
     if (result == 0 && g == &g_str)
       {
         return fill_user_info_from_group (g, info, error);

Reply via email to