Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jberkman
gdm
gdm-2.16.1-dbus-security-tokens.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gdm-2.16.1-dbus-security-tokens.patch of Package gdm
--- gdm-2.8.0.7/configure.ac~ 2007-01-19 14:00:55.000000000 -0500 +++ gdm-2.8.0.7/configure.ac 2007-01-19 14:07:11.000000000 -0500 @@ -10,6 +10,7 @@ IT_PROG_INTLTOOL([0.35.0]) GNOME_DOC_INIT +DBUS_GLIB_REQUIRED=0.60 GLIB_REQUIRED=2.8.0 GTK_REQUIRED=2.6.0 PANGO_REQUIRED=1.3.0 @@ -141,7 +142,7 @@ PKG_CHECK_MODULES(VICIOUS, gtk+-2.0 >= $ AC_SUBST(VICIOUS_CFLAGS) AC_SUBST(VICIOUS_LIBS) -PKG_CHECK_MODULES(DAEMON, gtk+-2.0 >= $GTK_REQUIRED) +PKG_CHECK_MODULES(DAEMON, gtk+-2.0 >= $GTK_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED) AC_SUBST(DAEMON_CFLAGS) AC_SUBST(DAEMON_LIBS) --- gdm-2.8.0.7/daemon/gdm.c~ 2007-01-19 14:00:55.000000000 -0500 +++ gdm-2.8.0.7/daemon/gdm.c 2007-01-19 14:14:12.000000000 -0500 @@ -42,6 +42,9 @@ #include <syslog.h> #include <locale.h> +#define DBUS_API_SUBJECT_TO_CHANGE +#include <dbus/dbus-glib.h> + /* This should be moved to auth.c I suppose */ #include <X11/Xauth.h> @@ -70,6 +73,10 @@ #include <libdevinfo.h> #endif /* HAVE_LOGINDEVPERM */ +#define MONITOR_SERVICE "com.novell.Pkcs11Monitor" +#define MONITOR_PATH "/com/novell/Pkcs11Monitor" +#define MONITOR_INTERFACE "com.novell.Pkcs11Monitor" + /* Local functions */ static void gdm_config_parse (void); static void gdm_handle_message (GdmConnection *conn, @@ -78,6 +85,8 @@ static void gdm_handle_message (GdmConne static void gdm_handle_user_message (GdmConnection *conn, const char *msg, gpointer data); +static void gdm_reset_local_displays (void); +static void gdm_watch_for_security_tokens (void); static void gdm_daemonify (void); static void gdm_safe_restart (void); static void gdm_try_logout_action (GdmDisplay *disp); @@ -1449,6 +1449,8 @@ main (int argc, char *argv[]) /* Initialize runtime environment */ umask (022); + g_type_init (); + ctx = g_option_context_new (_("- The GNOME login manager")); g_option_context_add_main_entries (ctx, options, _("main options")); @@ -1691,6 +1693,8 @@ main (int argc, char *argv[]) gdm_xdmcp_run (); } + gdm_watch_for_security_tokens (); + /* We always exit via exit (), and sadly we need to g_main_quit () * at times not knowing if it's this main or a recursive one we're * quitting. @@ -4633,4 +4646,44 @@ gdm_handle_user_message (GdmConnection * } } +static void +gdm_reset_local_displays (void) +{ + GSList *li; + + for (li = displays; li != NULL; li = li->next) { + GdmDisplay *d = li->data; + + if (d->attached) + send_slave_command (d, GDM_NOTIFY_RESET); + } +} + +static void +gdm_watch_for_security_tokens (void) +{ + DBusGConnection *conn; + GError *err = NULL; + DBusGProxy *monitor; + + conn = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err); + if (!conn) { + gdm_error (_("Cannot connect to dbus bus; smart card support disabled: %s"), + err->message); + g_error_free (err); + return; + } + + monitor = dbus_g_proxy_new_for_name (conn, + MONITOR_SERVICE, + MONITOR_PATH, + MONITOR_INTERFACE); + + dbus_g_proxy_add_signal (monitor, "SecurityTokenInserted", G_TYPE_STRING, G_TYPE_INVALID); + dbus_g_proxy_connect_signal (monitor, "SecurityTokenInserted", G_CALLBACK (gdm_reset_local_displays), NULL, NULL); + + dbus_g_proxy_add_signal (monitor, "SecurityTokenRemoved", G_TYPE_STRING, G_TYPE_INVALID); + dbus_g_proxy_connect_signal (monitor, "SecurityTokenRemoved", G_CALLBACK (gdm_reset_local_displays), NULL, NULL); +} + /* EOF */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor