Changeset 1968
- Timestamp:
- 12/02/04 23:01:58 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/conf/pykota.conf.sample
r1956 r1968 81 81 #storageuser: cn=notadmin,dc=librelogiciel,dc=com 82 82 #storageuserpw: abc.123 83 # 84 # TLS support for LDAP 85 # 86 # ldaptls can be set to either Yes or No 87 # the default value when not set is No, meaning that TLS won't be used. 88 #ldaptls: No 89 # 90 # cacert points to the CA Certificate file to use for TLS. 91 # Ensure that every user who can launch PyKota commands can read this file. 92 # There's NO default value for this directive. 93 #cacert /etc/pykota/mycertfile 94 # 83 95 # 84 96 # Here we define some helpers to know where … … 92 104 #printerbase: ou=Printers,ou=PyKota,dc=librelogiciel,dc=com 93 105 #printerrdn: cn 94 #jobbase: ou=Jobs,ou=PyKota,dc=librelogiciel,dc=com95 106 #userquotabase: ou=UQuotas,ou=PyKota,dc=librelogiciel,dc=com 96 107 #groupquotabase: ou=GQuotas,ou=PyKota,dc=librelogiciel,dc=com 108 #jobbase: ou=Jobs,ou=PyKota,dc=librelogiciel,dc=com 97 109 #lastjobbase: ou=LastJobs,ou=PyKota,dc=librelogiciel,dc=com 98 110 # -
pykota/trunk/NEWS
r1967 r1968 24 24 - 1.21alpha11 : 25 25 26 - TLS is now supported with the LDAP backend. Thanks to Stefan 27 Wold for the patch. 28 26 29 - edpkota now accepts the -U | --used value command line argument 27 30 to preset the page counters to an initial value. Thanks to -
pykota/trunk/pykota/config.py
r1956 r1968 22 22 # 23 23 # $Log$ 24 # Revision 1.58 2004/12/02 22:01:58 jalet 25 # TLS is now supported with the LDAP backend 26 # 24 27 # Revision 1.57 2004/11/22 21:53:38 jalet 25 28 # Added the reject_unknown directive to pykota.conf to reject user/group … … 337 340 if ldapinfo[field].lower().startswith('attach(') : 338 341 ldapinfo[field] = ldapinfo[field][7:-1] 342 343 # should we use TLS, by default (if unset) value is NO 344 ldapinfo["ldaptls"] = self.isTrue(self.getGlobalOption("ldaptls", ignore=1)) 345 ldapinfo["cacert"] = self.getGlobalOption("cacert", ignore=1) 346 if ldapinfo["cacert"] : 347 ldapinfo["cacert"] = ldapinfo["cacert"].strip() 348 if ldapinfo["ldaptls"] : 349 if not os.access(ldapinfo["cacert"] or "", os.R_OK) : 350 raise PyKotaConfigError, _("Option ldaptls is set, but certificate %s is not readable.") % str(ldapinfo["cacert"]) 339 351 return ldapinfo 340 352 -
pykota/trunk/pykota/storages/ldapstorage.py
r1966 r1968 22 22 # 23 23 # $Log$ 24 # Revision 1.88 2004/12/02 22:01:58 jalet 25 # TLS is now supported with the LDAP backend 26 # 24 27 # Revision 1.87 2004/12/02 12:34:00 jalet 25 28 # Now automates LDAP reconnections if the server dropped the connection due … … 353 356 try : 354 357 self.database = ldap.initialize(self.savedhost) 358 if self.info["ldaptls"] : 359 # we want TLS 360 ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, self.info["cacert"]) 361 self.database.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_DEMAND) 362 self.database.start_tls_s() 355 363 self.database.simple_bind_s(self.saveduser, self.savedpasswd) 356 364 self.basedn = self.saveddbname