From: David Mulder Date: Fri, 26 Feb 2021 16:45:03 +0000 (-0700) Subject: gpo: vgp_openssh_ext create the config dir X-Git-Tag: tevent-0.11.0~1662 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4d9d8591e62ff5598e4ca2a54e036aefb5d0c01;p=thirdparty%2Fsamba.git gpo: vgp_openssh_ext create the config dir We should create the /etc/ssh/sshd_config.d dir if it doesn't exist. Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/python/samba/vgp_openssh_ext.py b/python/samba/vgp_openssh_ext.py index 488bfa728ae..0252e9208bb 100644 --- a/python/samba/vgp_openssh_ext.py +++ b/python/samba/vgp_openssh_ext.py @@ -66,6 +66,8 @@ class vgp_openssh_ext(gp_xml_ext): attribute = get_string(b64encode(get_bytes(gpo.name) + get_bytes(cfg_dir))) fname = self.gp_db.retrieve(str(self), attribute) + if not os.path.isdir(cfg_dir): + os.mkdir(cfg_dir, 0o640) if fname and os.path.exists(fname): f = open(fname, 'w') else: