diff options
author | Marek Kasik <mkasik@redhat.com> | 2015-04-15 16:17:26 +0200 |
---|---|---|
committer | Marek Kasik <mkasik@redhat.com> | 2015-04-15 16:18:27 +0200 |
commit | 5ef6baddc8be14dfe433fd77ae098d493300f172 (patch) | |
tree | b3dced8ad61f5aeda33c287310c025021d0865f7 | |
parent | 0f41e196509c7c30f48516fa00e3396db565d5e8 (diff) | |
download | gnome-settings-daemon-5ef6baddc8be14dfe433fd77ae098d493300f172.tar.gz |
print-notifications: Do not block because of authentication
Set a password callback for CUPS returning NULL to not block g-s-d
on password request when handling subscriptions.
We don't have a better solution right now (a better one would be to show
a password dialog to user).
https://bugzilla.gnome.org/show_bug.cgi?id=725440
-rw-r--r-- | plugins/print-notifications/gsd-print-notifications-manager.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/print-notifications/gsd-print-notifications-manager.c b/plugins/print-notifications/gsd-print-notifications-manager.c index e5591792..b557bd3c 100644 --- a/plugins/print-notifications/gsd-print-notifications-manager.c +++ b/plugins/print-notifications/gsd-print-notifications-manager.c @@ -107,6 +107,16 @@ G_DEFINE_TYPE (GsdPrintNotificationsManager, gsd_print_notifications_manager, G_ static gpointer manager_object = NULL; +static const char * +password_cb (const char *prompt, + http_t *http, + const char *method, + const char *resource, + void *user_data) +{ + return NULL; +} + static char * get_dest_attr (const char *dest_name, const char *attr, @@ -1297,6 +1307,11 @@ gsd_print_notifications_manager_start_idle (gpointer data) manager->priv->printing_printers = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + /* + * Set a password callback which cancels authentication + * before we prepare a correct solution (see bug #725440). + */ + cupsSetPasswordCB2 (password_cb, NULL); if (server_is_local (cupsServer ())) { manager->priv->num_dests = cupsGetDests (&manager->priv->dests); |