hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Tue Mar 6 03:27:15 PST 2007
hald/hald_dbus.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
New commits:
diff-tree c31c32b8b7c0fed9c871da947f35922e03ad6ed3 (from f21d765994e4db15e43d339fa8c7d7d0e6e36c12)
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Tue Mar 6 12:27:08 2007 +0100
fixed uid datatype in CallerInfo to unsigned long
Fixed uid datatype in struct CallerInfo to avoid problems on 64bit
archs. dbus_bus_get_unix_user() returns 'unsigned long' and
CallerInfo->uid is uid_t (unsigned int) which cause a compiler
warning:
'comparison is always false due to limited range of data type'.
diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
index dccadc4..07612c5 100644
--- a/hald/hald_dbus.c
+++ b/hald/hald_dbus.c
@@ -931,7 +931,7 @@ device_get_all_properties (DBusConnectio
}
typedef struct {
- uid_t uid; /* uid of caller */
+ unsigned long uid; /* uid of caller */
#ifdef HAVE_CONKIT
pid_t pid; /* process ID of caller */
gboolean in_active_session; /* caller is in an active session */
@@ -1059,7 +1059,7 @@ ci_tracker_get_info (const char *system_
dbus_error_init (&error);
ci->uid = dbus_bus_get_unix_user (dbus_connection, system_bus_unique_name, &error);
- if (ci->uid == (unsigned long) -1 || dbus_error_is_set (&error)) {
+ if (ci->uid == ((unsigned long) -1) || dbus_error_is_set (&error)) {
HAL_WARNING (("Could not get uid for connection: %s %s", error.name, error.message));
dbus_error_free (&error);
goto error;
@@ -3385,7 +3385,7 @@ hald_exec_method (HalDevice *d, CallerIn
}
#endif /* HAVE_CONKIT */
- sprintf (uid_export, "HAL_METHOD_INVOKED_BY_UID=%d", ci->uid);
+ sprintf (uid_export, "HAL_METHOD_INVOKED_BY_UID=%lu", ci->uid);
extra_env[0] = uid_export;
snprintf (sender_export, sizeof (sender_export),
"HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME=%s", dbus_message_get_sender (message));
More information about the hal-commit
mailing list