From: David Mulder Date: Fri, 11 Nov 2022 16:41:52 +0000 (-0700) Subject: gp: Password and Kerberos policies fail on unknown key X-Git-Tag: talloc-2.4.0~553 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ad8e8d4d43b08cf1747da048c2fcc16d45a59c5;p=thirdparty%2Fsamba.git gp: Password and Kerberos policies fail on unknown key If unrecognized keys are set in the GptTmpl.inf, the extensions would fail to apply. Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/python/samba/gp/gp_sec_ext.py b/python/samba/gp/gp_sec_ext.py index 667bc4cd48b..16cbc4c7013 100644 --- a/python/samba/gp/gp_sec_ext.py +++ b/python/samba/gp/gp_sec_ext.py @@ -67,6 +67,8 @@ class gp_krb_ext(gp_inf_ext): for section in inf_conf.sections(): if section == str(self): for key, value in inf_conf.items(section): + if key not in gp_krb_ext.apply_map: + continue att = gp_krb_ext.apply_map[key] value_func = self.mapper().get(att) self.set_kdc_tdb(att, value_func(value)) @@ -153,6 +155,8 @@ class gp_access_ext(gp_inf_ext): for section in inf_conf.sections(): if section == str(self): for key, value in inf_conf.items(section): + if key not in gp_access_ext.apply_map: + continue att = gp_access_ext.apply_map[key] (update_samba, value_func) = self.mapper().get(att) update_samba(att, value_func(value))