diff options
| author | Andreas Schneider <asn@samba.org> | 2024-01-22 14:14:30 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2024-01-29 09:32:46 +0000 |
| commit | 6a9630eff624643fd725219775784e68d967d04c (patch) | |
| tree | 8c86b6c7fb5d3a1e81b599c48d6708ab740b2747 /python | |
| parent | 6e6d8384f369e2b850921c7b4d54742f501c115c (diff) | |
| download | samba-6a9630eff624643fd725219775784e68d967d04c.tar.gz samba-6a9630eff624643fd725219775784e68d967d04c.tar.bz2 samba-6a9630eff624643fd725219775784e68d967d04c.zip | |
python:gp: Avoid path check for cepces-submit
find_cepces_submit() uses which(), which returns None if not found.
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>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/gp/gp_cert_auto_enroll_ext.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/gp/gp_cert_auto_enroll_ext.py b/python/samba/gp/gp_cert_auto_enroll_ext.py index 8ba1960efe5..ddc14ae8e8d 100644 --- a/python/samba/gp/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp/gp_cert_auto_enroll_ext.py @@ -185,7 +185,7 @@ def find_cepces_submit(): def get_supported_templates(server): cepces_submit = find_cepces_submit() - if not cepces_submit or not os.path.exists(cepces_submit): + if not cepces_submit: log.error('Failed to find cepces-submit') return [] @@ -301,7 +301,7 @@ def cert_enroll(ca, ldb, trust_dir, private_dir, auth='Kerberos'): # Setup Certificate Auto Enrollment getcert = which('getcert') cepces_submit = find_cepces_submit() - if getcert is not None and os.path.exists(cepces_submit): + if getcert is not None and cepces_submit is not None: p = Popen([getcert, 'add-ca', '-c', ca['name'], '-e', '%s --server=%s --auth=%s' % (cepces_submit, ca['hostname'], auth)], |
