The Samba-Bugzilla – Attachment 18226 Details for
Bug 15552
samba-gpupdate should print a useful message if cepces-submit can't be found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.19
v4-19-samba-fix-gpupdate-cepces-message.patch (text/plain), 2.01 KB, created by
Andreas Schneider
on 2024-01-11 15:15:02 UTC
(
hide
)
Description:
patch for 4.19
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2024-01-11 15:15:02 UTC
Size:
2.01 KB
patch
obsolete
>From 8e09d349587f2c690748573f8848f8b1d99cf5a3 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Tue, 9 Jan 2024 08:50:01 +0100 >Subject: [PATCH] python:gp: Print a nice message if cepces-submit can't be > found > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15552 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: David Mulder <dmulder@samba.org> >(cherry picked from commit 8eb42425a8eb1b30ca0e94dfc01d8175ae5cde4b) >--- > python/samba/gp/gp_cert_auto_enroll_ext.py | 24 ++++++++++++---------- > 1 file changed, 13 insertions(+), 11 deletions(-) > >diff --git a/python/samba/gp/gp_cert_auto_enroll_ext.py b/python/samba/gp/gp_cert_auto_enroll_ext.py >index 64c35782ae8..08d1a7348cd 100644 >--- a/python/samba/gp/gp_cert_auto_enroll_ext.py >+++ b/python/samba/gp/gp_cert_auto_enroll_ext.py >@@ -185,17 +185,19 @@ def find_cepces_submit(): > > def get_supported_templates(server): > cepces_submit = find_cepces_submit() >- if os.path.exists(cepces_submit): >- env = os.environ >- env['CERTMONGER_OPERATION'] = 'GET-SUPPORTED-TEMPLATES' >- p = Popen([cepces_submit, '--server=%s' % server, '--auth=Kerberos'], >- env=env, stdout=PIPE, stderr=PIPE) >- out, err = p.communicate() >- if p.returncode != 0: >- data = { 'Error': err.decode() } >- log.error('Failed to fetch the list of supported templates.', data) >- return out.strip().split() >- return [] >+ if not cepces_submit or not os.path.exists(cepces_submit): >+ log.error('Failed to find cepces-submit') >+ return [] >+ >+ env = os.environ >+ env['CERTMONGER_OPERATION'] = 'GET-SUPPORTED-TEMPLATES' >+ p = Popen([cepces_submit, '--server=%s' % server, '--auth=Kerberos'], >+ env=env, stdout=PIPE, stderr=PIPE) >+ out, err = p.communicate() >+ if p.returncode != 0: >+ data = {'Error': err.decode()} >+ log.error('Failed to fetch the list of supported templates.', data) >+ return out.strip().split() > > > def getca(ca, url, trust_dir): >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
dmulder
:
review+
Actions:
View
Attachments on
bug 15552
: 18226