diff options
author | Andre Heinecke <aheinecke@intevation.de> | 2015-02-05 11:14:01 +0100 |
---|---|---|
committer | Marek Kasik <mkasik@redhat.com> | 2015-03-09 14:19:57 +0100 |
commit | e99e282b5ae9190f859c6b4d3107031d5474431f (patch) | |
tree | 620d7fc9217ffb922ec6ef65887ee1aaaae08d71 /modules/printbackends | |
parent | 52f5a78c6daeaf0eec9b014d9cfefb6d844a4f6a (diff) | |
download | gtk+-e99e282b5ae9190f859c6b4d3107031d5474431f.tar.gz |
Prevent empty password request popup for kerberos
If auth_info_required is only set to "negotiate" the
request password dialog is shown anyway for each print
job without any input fields. As the request_password
dialog only handles username, password and domain.
https://bugzilla.gnome.org/show_bug.cgi?id=669008
Diffstat (limited to 'modules/printbackends')
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 7cd38416c7..683410ee40 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -770,8 +770,24 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend, ps->job = g_object_ref (job); ps->http = http; - request->need_auth_info = cups_printer->auth_info_required != NULL; - request->auth_info_required = g_strdupv (cups_printer->auth_info_required); + request->need_auth_info = FALSE; + request->auth_info_required = NULL; + + /* Check if auth_info_required is set and if it should be handled. + * The cups libraries handle the ticket exchange for "negotiate". */ + if (cups_printer->auth_info_required != NULL && + g_strv_length (cups_printer->auth_info_required) == 1 && + g_strcmp0 (cups_printer->auth_info_required[0], "negotiate") == 0) + { + GTK_NOTE (PRINTING, + g_print ("CUPS Backend: Ignoring auth-info-required \"%s\"\n", + cups_printer->auth_info_required[0])); + } + else if (cups_printer->auth_info_required != NULL) + { + request->need_auth_info = TRUE; + request->auth_info_required = g_strdupv (cups_printer->auth_info_required); + } cups_request_execute (GTK_PRINT_BACKEND_CUPS (print_backend), request, |