From: David Mulder Date: Tue, 12 Apr 2022 16:25:51 +0000 (-0600) Subject: gpo: Fix crash in Cert Auth Enroll RSOP X-Git-Tag: talloc-2.3.4~271 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6171dfc52835058082fa5d86f82fca7f51827ab5;p=thirdparty%2Fsamba.git gpo: Fix crash in Cert Auth Enroll RSOP Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/python/samba/gp_cert_auto_enroll_ext.py b/python/samba/gp_cert_auto_enroll_ext.py index 2e01853108e..ab77cbba599 100644 --- a/python/samba/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp_cert_auto_enroll_ext.py @@ -252,6 +252,8 @@ class gp_cert_auto_enroll_ext(gp_pol_ext): for ca in cas: policy = 'Auto Enrollment Policy' cn = ca['cn'][0] + if policy not in output: + output[policy] = {} output[policy][cn] = {} output[policy][cn]['CA Certificate'] = \ format_root_cert(ca['cACertificate'][0]).decode()