From 999e6190bbc0fc131a8ada00d3b9a9b8866bcf7e Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 7 Jul 2015 16:20:47 +0200 Subject: [PATCH] Retire le sys.path.append --- Python/etc/postgresql/9.1/main/pg_hba.conf | 6 ++---- Python/etc/postgresql/9.1/main/pg_ident.conf | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Python/etc/postgresql/9.1/main/pg_hba.conf b/Python/etc/postgresql/9.1/main/pg_hba.conf index 89d0615..0c6bced 100644 --- a/Python/etc/postgresql/9.1/main/pg_hba.conf +++ b/Python/etc/postgresql/9.1/main/pg_hba.conf @@ -2,11 +2,9 @@ info["owner"] = "postgres" info["group"] = "postgres" info["mode"] = 0640 -import sys -sys.path.append('/usr/scripts') -import lc_ldap.shortcuts +include("ldap_conn") -conn = lc_ldap.shortcuts.lc_ldap_readonly() +conn = ldap_conn comment_start = "#" header("Gestion du mapping avec les base de données") diff --git a/Python/etc/postgresql/9.1/main/pg_ident.conf b/Python/etc/postgresql/9.1/main/pg_ident.conf index 568e09a..9969293 100644 --- a/Python/etc/postgresql/9.1/main/pg_ident.conf +++ b/Python/etc/postgresql/9.1/main/pg_ident.conf @@ -3,11 +3,9 @@ info["group"] = "postgres" info["mode"] = 0640 -import sys -sys.path.append('/usr/scripts') -import lc_ldap.shortcuts +include("ldap_conn") -conn = lc_ldap.shortcuts.lc_ldap_readonly() +conn = ldap_conn comment_start = "#" header("Gestion des acces ident pour les utilisateurs") @@ -18,7 +16,7 @@ nounous = [adm['uid'][0] for adm in adm_objects] apprentis_objects = conn.search(u'droits=apprenti') apprentis = [appr['uid'][0] for appr in apprentis_objects] -out("""# PostgreSQL User Name Maps +out("""#PostgreSQL User Name Maps # ========================= # # Refer to the PostgreSQL documentation, chapter "Client