From: David Mulder Date: Thu, 22 Jul 2021 16:16:42 +0000 (-0600) Subject: gpo: Ignore symlink failure on sscep renew X-Git-Tag: ldb-2.5.0~973 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a04052dad4b52a20d47805a41b892bb4fecb433;p=thirdparty%2Fsamba.git gpo: Ignore symlink failure on sscep renew 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 99465ef01c0..d20bbdee119 100644 --- a/python/samba/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp_cert_auto_enroll_ext.py @@ -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.')