]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2005-07-08 Joe Shaw <joeshaw@novell.com>
authorJoe Shaw <joeshaw@novell.com>
Fri, 8 Jul 2005 14:36:22 +0000 (14:36 +0000)
committerJoe Shaw <joeshaw@novell.com>
Fri, 8 Jul 2005 14:36:22 +0000 (14:36 +0000)
* configure.in: Add a configure option, --with-console-auth-dir

* dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
new setting.  Patch from Kay Sievers.

ChangeLog
configure.in
dbus/dbus-sysdeps-util.c
dbus/dbus-sysdeps.h

index f7320f968415af21031e88e9165ea797caab46ed..40c958891e29e95ad6fc643247af284e7af2372a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-08  Joe Shaw  <joeshaw@novell.com>
+
+       * configure.in: Add a configure option, --with-console-auth-dir
+       
+       * dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
+       new setting.  Patch from Kay Sievers.
+
 2005-07-06  Colin Walters  <walters@verbum.org>
 
        * dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
index 600a8deb162314ac49678458fee06fe5996eb18a..4c77ea5425b284395f185ad62943c7c4fa096e53 100644 (file)
@@ -70,6 +70,7 @@ AC_ARG_WITH(session-socket-dir, [  --with-session-socket-dir=[dirname] Where to
 AC_ARG_WITH(test-socket-dir,    [  --with-test-socket-dir=[dirname]    Where to put sockets for make check])
 AC_ARG_WITH(system-pid-file,    [  --with-system-pid-file=[pidfile]    PID file for systemwide daemon])
 AC_ARG_WITH(system-socket,      [  --with-system-socket=[filename]     UNIX domain socket for systemwide daemon])
+AC_ARG_WITH(console-auth-dir,   [  --with-console-auth-dir=[dirname]   directory to check for console ownerhip])
 
 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files 
 dnl and also some stuff in the test/ subdir
@@ -1167,6 +1168,16 @@ fi
 
 AC_SUBST(DBUS_SYSTEM_PID_FILE)
 
+#### Directory to check for console ownership
+if ! test -z "$with_console_auth_dir"; then
+   DBUS_CONSOLE_AUTH_DIR=$with_console_auth_dir
+else
+   DBUS_CONSOLE_AUTH_DIR=/var/run/console/
+fi
+
+AC_SUBST(DBUS_CONSOLE_AUTH_DIR)
+AC_DEFINE_UNQUOTED(DBUS_CONSOLE_AUTH_DIR, "$DBUS_CONSOLE_AUTH_DIR", [Directory to check for console ownerhip])
+
 #### Tell tests where to find certain stuff in builddir
 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
 
@@ -1360,6 +1371,7 @@ echo "
         System bus address:       ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
         System bus PID file:      ${DBUS_SYSTEM_PID_FILE}
         Session bus socket dir:   ${DBUS_SESSION_SOCKET_DIR}
+        Console auth dir:         ${DBUS_CONSOLE_AUTH_DIR}
         'make check' socket dir:  ${TEST_SOCKET_DIR}
 "
 
index 32ceddee6f5734f097f1d620528a15c3149838c3..9964b56f7aa56d12356d8c85d755af5f49dc92db 100644 (file)
@@ -359,7 +359,7 @@ _dbus_user_at_console (const char *username,
       return FALSE;
     }
 
-  if (!_dbus_string_append (&f, DBUS_CONSOLE_DIR))
+  if (!_dbus_string_append (&f, DBUS_CONSOLE_AUTH_DIR))
     {
       _DBUS_SET_OOM (error);
       goto out;
index da80c0526be8bcc519db957b2b9c7f3195c76c38..04d7cd581f6ebaae31d548a26c8d4fed201deebb 100644 (file)
@@ -99,8 +99,6 @@ typedef unsigned long dbus_gid_t;
 #define DBUS_UID_FORMAT "%lu"
 #define DBUS_GID_FORMAT "%lu"
 
-#define DBUS_CONSOLE_DIR "/var/run/console/"
-
 /**
  * Struct representing socket credentials
  */