]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gpo: Ignore symlink failure on sscep renew
authorDavid Mulder <dmulder@suse.com>
Thu, 22 Jul 2021 16:16:42 +0000 (10:16 -0600)
committerJeremy Allison <jra@samba.org>
Fri, 13 Aug 2021 19:14:30 +0000 (19:14 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/gp_cert_auto_enroll_ext.py

index 99465ef01c08039052c5a85a3da2c66d7edec1b1..d20bbdee119e578e7dd39a5eae6fec40b5d69659 100644 (file)
@@ -120,6 +120,11 @@ def cert_enroll(ca, trust_dir, private_dir, logger):
                             ' admin trust anchors.' +
                             ' The directory %s was not found' % \
                                                         global_trust_dir)
+            except FileExistsError:
+                # If we're simply downloading a renewed cert, the symlink
+                # already exists. Ignore the FileExistsError. Preserve the
+                # existing symlink in the unapply data.
+                data['files'].append(dst)
     else:
         logger.warn('sscep is not installed, which prevents the installation' +
                     ' of the root certificate chain.')