summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-transport.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2006-09-16 18:46:48 +0000
committerHavoc Pennington <hp@redhat.com>2006-09-16 18:46:48 +0000
commite001455a0300cc1df17684a028049c8c33e4f575 (patch)
tree6f396d7fca0aa4e774904e2ff6d830889e853082 /dbus/dbus-transport.c
parent8027efc97b4bec85f674570f878919cb72456745 (diff)
2006-09-16 Havoc Pennington <hp@redhat.com>
Attempt auditing public API to remove all cases where a Unix function returns weird emulated goo to Windows. This probably breaks the bus daemon on Windows, to fix it again we may need to stop processing unix-specific config options on Windows, and may need to add Windows-specific public API or config options. * configure.in (LT_CURRENT, LT_AGE): increment current and age, to reflect added interfaces; should not break soname. * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated): do not invoke unix user function on Windows. Kind of a hacky fix, but we don't want a "unix uid" leaking out on Windows. * dbus/dbus-connection.c (dbus_connection_get_socket): add new API to get the socket fd on Windows or UNIX (dbus_connection_get_unix_fd): make this always fail on Windows
Diffstat (limited to 'dbus/dbus-transport.c')
-rw-r--r--dbus/dbus-transport.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c
index fd44595f..60e2e6dd 100644
--- a/dbus/dbus-transport.c
+++ b/dbus/dbus-transport.c
@@ -524,11 +524,28 @@ _dbus_transport_get_is_authenticated (DBusTransport *transport)
_dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME);
_dbus_connection_unlock (connection);
-
+
+#ifdef DBUS_WIN
+ /* FIXME this is a bad hack for now because we want to ship 1.0
+ * without leaking any weird unix-emulation implementation details
+ * to the public API. The correct fix will be to move this
+ * unix user function invocation into dbus-transport-unix.c, and
+ * have a separate, appropriate function for Windows, if any.
+ * On Windows we may only use the session (not system) daemon
+ * anyway, so it might not matter.
+ *
+ * The windows and unix callbacks should both be stored/set
+ * in cross-platform code, so apps can unconditionally set
+ * them both, but only the platform-appropriate one
+ * should ever be invoked.
+ */
+ allow = TRUE;
+#else
allow = (* unix_user_function) (connection,
auth_identity.uid,
unix_user_data);
-
+#endif
+
_dbus_verbose ("lock %s post unix user function\n", _DBUS_FUNCTION_NAME);
_dbus_connection_lock (connection);