From e8fe9b6371f914f2ef144bea97dad61eb97cfc84 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 4 Feb 2015 13:50:03 +0100 Subject: [PATCH] Fix unix cmake compile caused by adding new code. --- bus/driver.c | 4 +++- cmake/CMakeLists.txt | 6 +++--- cmake/config.h.cmake | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bus/driver.c b/bus/driver.c index 955c4d5..1289da9 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -134,7 +134,8 @@ bus_driver_check_caller_is_privileged (DBusConnection *connection, } return TRUE; -#elifdef DBUS_WIN +#else +#ifdef DBUS_WIN char *windows_sid = NULL; dbus_bool_t ret = FALSE; @@ -169,6 +170,7 @@ out: "please teach bus/driver.c how uids work on this platform"); return FALSE; #endif +#endif } static dbus_bool_t bus_driver_send_welcome_message (DBusConnection *connection, diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 32250f5..b997f8b 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -409,8 +409,6 @@ else (WIN32) set (DBUS_CONSOLE_AUTH_DIR "/var/run/console/") endif (WIN32) -set (DBUS_USER ) - # This won't work on Windows. It's not meant to - the system bus is # meaningless on Windows anyway. # @@ -429,6 +427,7 @@ if (WIN32) set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf") # bus-test expects a non empty string set (DBUS_USER "Administrator") + set (DBUS_TEST_USER "guest") else (WIN32) set (DBUS_SESSION_BUS_LISTEN_ADDRESS "unix:tmpdir=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default listening address") set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients") @@ -436,7 +435,8 @@ else (WIN32) set (configdir ${sysconfdir}/dbus-1 ) set (DBUS_SYSTEM_CONFIG_FILE ${configdir}/system.conf) set (DBUS_SESSION_CONFIG_FILE ${configdir}/session.conf) - set (DBUS_USER "root") + set (DBUS_USER "messagebus") + set (DBUS_TEST_USER "nobody") endif (WIN32) set (DBUS_DAEMON_NAME "dbus-daemon" CACHE STRING "The name of the dbus daemon executable") diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index e8b0bc5..f718052 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -204,6 +204,9 @@ #cmakedefine FD_SETSIZE @FD_SETSIZE@ +#cmakedefine DBUS_USER "@DBUS_USER@" +#cmakedefine DBUS_TEST_USER "@DBUS_TEST_USER@" + // system type defines #if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE) # define DBUS_WIN -- 1.8.4.5