krb5-auth-dialog r135 - in trunk: . src
- From: guidog svn gnome org
- To: svn-commits-list gnome org
- Subject: krb5-auth-dialog r135 - in trunk: . src
- Date: Fri, 27 Mar 2009 07:06:47 +0000 (UTC)
Author: guidog
Date: Fri Mar 27 07:06:47 2009
New Revision: 135
URL: http://svn.gnome.org/viewvc/krb5-auth-dialog?rev=135&view=rev
Log:
handle GTK_RESPONSE_DELETE_EVENT like GTK_RESPONSE_CANCEL
so pressing ESC or closing the dialog has the same effect than pressing
cancel.
look at "cancled" instead of looking at the kerberos error codes
more robust since heimdal and mit have different responses, let alone
pkinit
Modified:
trunk/ChangeLog
trunk/src/krb5-auth-dialog.c
Modified: trunk/src/krb5-auth-dialog.c
==============================================================================
--- trunk/src/krb5-auth-dialog.c (original)
+++ trunk/src/krb5-auth-dialog.c Fri Mar 27 07:06:47 2009
@@ -265,11 +265,11 @@
password = ka_pwdialog_get_password(pwdialog);
password_len = strlen (password);
break;
+ case GTK_RESPONSE_DELETE_EVENT:
case GTK_RESPONSE_CANCEL:
canceled = TRUE;
break;
case GTK_RESPONSE_NONE:
- case GTK_RESPONSE_DELETE_EVENT:
break;
default:
g_warning ("Unknown Response: %d", response);
@@ -752,24 +752,19 @@
ka_pwdialog_set_persist(pwdialog, TRUE);
do {
- retry = TRUE;
retval = grab_credentials (applet);
if (invalid_auth)
continue;
- switch (retval) {
- case 0: /* success */
- success = TRUE;
- case KRB5_LIBOS_PWDINTR: /* canceled (heimdal) */
- case KRB5_LIBOS_CANTREADPWD: /* canceled (mit) */
- retry = FALSE;
- break;
- case KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN:
- default:
- ka_error_dialog(retval);
- retry = FALSE;
- break;
+ if (canceled)
+ break;
+ if (retval) {
+ ka_error_dialog(retval);
+ break;
+ } else {
+ success = TRUE;
+ break;
}
- } while(retry);
+ } while(TRUE);
ka_pwdialog_set_persist(pwdialog, FALSE);
credentials_expiring_real(applet);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]