[sysadmin-bin] Do the same with export-mail and land the missing sys module import
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Do the same with export-mail and land the missing sys module import
- Date: Mon, 1 Oct 2018 14:43:10 +0000 (UTC)
commit 73a85cbf38823fec4b9c4cfeea41b483abf1b109
Author: Andrea Veri <averi redhat com>
Date: Mon Oct 1 16:42:52 2018 +0200
Do the same with export-mail and land the missing sys module import
mail/export-mail.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/mail/export-mail.py b/mail/export-mail.py
index dff229d..a744a92 100755
--- a/mail/export-mail.py
+++ b/mail/export-mail.py
@@ -4,10 +4,12 @@ import ldap
import ldap.modlist
import ldap.filter
import subprocess
+import sys
LDAP_URL='ldaps://account.gnome.org:636/'
LDAP_GROUP_BASE='cn=groups,cn=accounts,dc=gnome,dc=org'
LDAP_USER_BASE='cn=users,cn=accounts,dc=gnome,dc=org'
+LDAP_CA_PATH = '/etc/ipa/ca.crt'
execfile('/home/admin/secret/freeipa')
@@ -66,6 +68,8 @@ def fetch_group_members(group):
if __name__ == '__main__':
global l
try:
+ ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, LDAP_CA_PATH)
+
l = ldap.initialize(LDAP_URL)
l.simple_bind_s("cn=Directory Manager", ldap_password)
except ldap.LDAPError, e:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]