From: Matt Rogers Date: Fri, 22 Apr 2016 16:53:41 +0000 (-0400) Subject: Add test for empty K/M key data handling X-Git-Tag: krb5-1.15-beta1~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2286a6493c7aab267cf0d9cca680edaf2968707;p=thirdparty%2Fkrb5.git Add test for empty K/M key data handling ticket: 8395 --- diff --git a/src/tests/t_mkey.py b/src/tests/t_mkey.py index 572b2adc87..c53b71b45c 100755 --- a/src/tests/t_mkey.py +++ b/src/tests/t_mkey.py @@ -328,4 +328,11 @@ check_mkvno(realm.user_princ, 1) realm.run([kdb5_util, 'use_mkey', '2', 'now-1day']) check_mkey_list((2, defetype, True, True), (1, des3, True, False)) +# Regression test for #8395. Purge the master key and verify that a +# master key fetch does not segfault. +realm.run([kadminl, 'purgekeys', '-all', 'K/M']) +out = realm.run([kadminl, 'getprinc', realm.user_princ], expected_code=1) +if 'Cannot find master key record in database' not in out: + fail('Unexpected output from failed master key fetch') + success('Master key rollover tests')