From 580cd3266f8805c01112017f233e22f54a54db11 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 20 Jun 2014 06:48:51 +0200 Subject: New upstream version 3.12.0 --- src/ka-kerberos.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/ka-kerberos.c') diff --git a/src/ka-kerberos.c b/src/ka-kerberos.c index db5cddd..2b0106e 100644 --- a/src/ka-kerberos.c +++ b/src/ka-kerberos.c @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program; if not, see . * */ @@ -221,8 +220,10 @@ credentials_expiring_real (KaApplet *applet) } /* copy principal from cache if any */ - if (krb5_principal_compare (kcontext, my_creds.client, kprincipal)) { - krb5_free_principal (kcontext, kprincipal); + if (kprincipal == NULL || + krb5_principal_compare (kcontext, my_creds.client, kprincipal)) { + if (kprincipal) + krb5_free_principal (kcontext, kprincipal); krb5_copy_principal (kcontext, my_creds.client, &kprincipal); } creds_expiry = my_creds.times.endtime; @@ -781,6 +782,8 @@ grab_credentials (KaApplet *applet) switch (retval) { case KRB5KDC_ERR_PREAUTH_FAILED: case KRB5KRB_AP_ERR_BAD_INTEGRITY: + case KRB5KRB_AP_ERR_MODIFIED: + case KRB5_GET_IN_TKT_LOOP: #ifdef HAVE_HX509_ERR_H case HX509_PKCS11_LOGIN: #endif /* Invalid password/pin, try again. */ @@ -1026,7 +1029,9 @@ ka_grab_credentials (KaApplet *applet) if (retval) { gchar *errmsg; - errmsg = ka_get_error_message (kcontext, retval); + errmsg = g_strdup_printf("%s%s", + ka_get_error_message (kcontext, retval), + is_online ? "" : _(" (No network connection)")); ka_pwdialog_error (pwdialog, errmsg); g_free (errmsg); break; -- cgit