aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-07-07 09:45:03 +0200
committerGuido Günther <agx@sigxcpu.org>2017-07-07 09:45:03 +0200
commit1455a30842838f5d5a70dbca931fea7dc9860e90 (patch)
tree49e08e9905af96bb3c6386f00a067bcd61d5e96f /debian/patches
parentDon't depend on unused libnm-glib-dev (diff)
downloadkrb5-auth-dialog-1455a30842838f5d5a70dbca931fea7dc9860e90.tar.gz
krb5-auth-dialog-1455a30842838f5d5a70dbca931fea7dc9860e90.tar.bz2
krb5-auth-dialog-1455a30842838f5d5a70dbca931fea7dc9860e90.zip
credentials_expiring_real: check if kcontext is valid
LP: #1700468
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/credentials_expiring_real-check-if-kcontext-is-valid.patch36
-rw-r--r--debian/patches/series1
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/credentials_expiring_real-check-if-kcontext-is-valid.patch b/debian/patches/credentials_expiring_real-check-if-kcontext-is-valid.patch
new file mode 100644
index 0000000..d4d1ab1
--- /dev/null
+++ b/debian/patches/credentials_expiring_real-check-if-kcontext-is-valid.patch
@@ -0,0 +1,36 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Fri, 7 Jul 2017 09:10:37 +0200
+Subject: credentials_expiring_real: check if kcontext is valid
+
+othewise we might crash when the credentials_expiring_once fires but
+we're already shutting down.
+
+LP: #1700468
+---
+ src/ka-kerberos.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/ka-kerberos.c b/src/ka-kerberos.c
+index 14fb03e..59f6b8b 100644
+--- a/src/ka-kerberos.c
++++ b/src/ka-kerberos.c
+@@ -222,6 +222,9 @@ credentials_expiring_real (KaApplet *applet)
+ krb5_timestamp now;
+ gboolean retval = FALSE;
+
++ if (!kcontext_valid)
++ return retval;
++
+ memset (&my_creds, 0, sizeof (my_creds));
+ ka_applet_set_tgt_renewable (applet, FALSE);
+ if (!ka_get_tgt_from_ccache (kcontext, &my_creds)) {
+@@ -947,8 +950,8 @@ static gboolean
+ ka_krb5_context_free ()
+ {
+ if (kcontext_valid) {
+- krb5_free_context (kcontext);
+ kcontext_valid = FALSE;
++ krb5_free_context (kcontext);
+ }
+ return TRUE;
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..410b950
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+credentials_expiring_real-check-if-kcontext-is-valid.patch
bgstack15