dbus/dbus dbus-userdb-util.c,1.6,1.7
John Palmieri
johnp at kemper.freedesktop.org
Wed Jun 7 12:59:13 PDT 2006
Update of /cvs/dbus/dbus/dbus
In directory kemper:/tmp/cvs-serv30324/dbus
Modified Files:
dbus-userdb-util.c
Log Message:
* configure.in:
* dbus/dbus-userdb-util.c:
Add Solaris console owner patch from Artem Kachitchkine
Index: dbus-userdb-util.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-userdb-util.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dbus-userdb-util.c 22 Mar 2005 17:57:27 -0000 1.6
+++ dbus-userdb-util.c 7 Jun 2006 19:59:11 -0000 1.7
@@ -48,6 +48,34 @@
const DBusUserInfo *info;
dbus_bool_t result = FALSE;
+#ifdef HAVE_CONSOLE_OWNER_FILE
+
+ DBusString f;
+ DBusStat st;
+
+ if (!_dbus_string_init (&f))
+ {
+ _DBUS_SET_OOM (error);
+ return FALSE;
+ }
+
+ if (!_dbus_string_append(&f, DBUS_CONSOLE_OWNER_FILE))
+ {
+ _dbus_string_free(&f);
+ _DBUS_SET_OOM (error);
+ return FALSE;
+ }
+
+ if (_dbus_stat(&f, &st, NULL) && (st.uid == uid))
+ {
+ _dbus_string_free(&f);
+ return TRUE;
+ }
+
+ _dbus_string_free(&f);
+
+#endif /* HAVE_CONSOLE_OWNER_FILE */
+
_dbus_user_database_lock_system ();
db = _dbus_user_database_get_system ();
More information about the dbus-commit
mailing list