From 6c013f3be1c2a48b82a4e8b92ce2163e3770c908 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 3 May 2003 20:53:40 +0000 Subject: 2003-05-03 Colin Walters * dbus/dbus-sysdeps.c (fill_user_info): Test against DBUS_UID_UNSET to determine whether to do a uid lookup or not. * Makefile.am: Update to use new .pc versioning scheme. --- dbus/dbus-sysdeps.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dbus') diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index 7673085f..d59498b1 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -1378,7 +1378,7 @@ fill_user_info (DBusUserInfo *info, result = getpwnam_r (username_c, &p_str, buf, sizeof (buf), &p); #else - if (uid >= 0) + if (uid != DBUS_UID_UNSET) p = getpwuid_r (uid, &p_str, buf, sizeof (buf)); else p = getpwnam_r (username_c, &p_str, buf, sizeof (buf)); @@ -1403,7 +1403,7 @@ fill_user_info (DBusUserInfo *info, /* I guess we're screwed on thread safety here */ struct passwd *p; - if (uid >= 0) + if (uid != DBUS_UID_UNSET) p = getpwuid (uid); else p = getpwnam (username_c); @@ -3047,6 +3047,12 @@ _dbus_become_daemon (const DBusString *pidfile, break; case 0: + + + s = _dbus_getenv ("DBUS_DEBUG_DAEMONIZE"); + if (s != NULL) + kill (_dbus_getpid (), SIGSTOP); + s = _dbus_getenv ("DBUS_DEBUG_OUTPUT"); if (s == NULL || *s == '\0') { -- cgit