]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gpo: vgp_openssh_ext create the config dir
authorDavid Mulder <dmulder@suse.com>
Fri, 26 Feb 2021 16:45:03 +0000 (09:45 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 8 Mar 2021 17:58:37 +0000 (17:58 +0000)
We should create the /etc/ssh/sshd_config.d dir
if it doesn't exist.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/vgp_openssh_ext.py

index 488bfa728aec2ff968ab295e7f24dabf03454ebd..0252e9208bbfe0550574eec6d74d7fec39575ff1 100644 (file)
@@ -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: