python:gp: Log an error if update fails
authorAndreas Schneider <asn@samba.org>
Mon, 22 Jan 2024 14:05:24 +0000 (15:05 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 29 Jan 2024 09:32:46 +0000 (09:32 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
python/samba/gp/gp_cert_auto_enroll_ext.py

index b55a0ce3bd0283e9a06ffb504fc6fb2af5162367..51b2874b371cc04cdee6106505866c0e1a13c9af 100644 (file)
@@ -347,7 +347,9 @@ def cert_enroll(ca, ldb, trust_dir, private_dir, auth='Kerberos'):
             data['files'].extend([keyfile, certfile])
             data['templates'].append(nickname)
         if update is not None:
-            Popen([update]).wait()
+            ret = Popen([update]).wait()
+            if ret != 0:
+                log.error('Failed to run %s' % (update))
     else:
         log.warn('certmonger and cepces must be installed for ' +
                  'certificate auto enrollment to work')