View | Details | Raw Unified | Return to bug 34738
Collapse All | Expand All

(-)a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/debian/univention-directory-logger.univention-config-registry-variables (+6 lines)
 Lines 9-11   Description[de]=Mit Variablen der Form 'ldap/logging/exclude*=DN' können Contai Link Here 
9
Description[en]=Variables in the format 'ldap/logging/exclude*=DN' can be used to exclude containers/OUs from the logging.
9
Description[en]=Variables in the format 'ldap/logging/exclude*=DN' can be used to exclude containers/OUs from the logging.
10
Type=str
10
Type=str
11
Categories=service-ldap
11
Categories=service-ldap
12
13
[ldap/logging/hash]
14
Description[de]=Legt den Namen des Hash-Algorithmus fest. Standard ist 'md5'.
15
Description[en]=Defines the name of the hash algorithm. Default is 'md5'.
16
Type=str
17
Categories=service-ldap
(-)a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py (-3 / +4 lines)
 Lines 36-42   import string Link Here 
36
import time
36
import time
37
import syslog
37
import syslog
38
import re
38
import re
39
import md5
39
import hashlib
40
import base64
40
import base64
41
import grp
41
import grp
42
import subprocess
42
import subprocess
 Lines 67-72   preferedGroup = "adm" Link Here 
67
gidNumber = 0  # fallback
67
gidNumber = 0  # fallback
68
filemode = '0640'
68
filemode = '0640'
69
cleanupDellog = True  # remove missed dellog entries (after reporting about them)
69
cleanupDellog = True  # remove missed dellog entries (after reporting about them)
70
digest = listener.configRegistry.get('ldap/logging/hash', 'md5')
70
71
71
72
72
def needsConversion(char):
73
def needsConversion(char):
 Lines 248-254   def handler(dn, new_copy, old_copy): Link Here 
248
			logfile.close()
249
			logfile.close()
249
		# 4. calculate nexthash, omitting the final line break to make validation of the
250
		# 4. calculate nexthash, omitting the final line break to make validation of the
250
		#    record more intituive
251
		#    record more intituive
251
		nexthash = md5.new(record[:-1]).hexdigest()
252
		nexthash = hashlib.new(digest, record[:-1]).hexdigest()
252
		# 5. cache nexthash (the actual logfile might be logrotated away..)
253
		# 5. cache nexthash (the actual logfile might be logrotated away..)
253
		cachefile.seek(0)
254
		cachefile.seek(0)
254
		cachefile.write(nexthash)
255
		cachefile.write(nexthash)
 Lines 318-324   def initialize(): Link Here 
318
			logfile.close()
319
			logfile.close()
319
320
320
		# 4. calculate initial hash
321
		# 4. calculate initial hash
321
		nexthash = md5.new(record).hexdigest()
322
		nexthash = hashlib.new(digest, record).hexdigest()
322
		# 5. cache nexthash (the actual logfile might be logrotated away..)
323
		# 5. cache nexthash (the actual logfile might be logrotated away..)
323
		cachefile.seek(0)
324
		cachefile.seek(0)
324
		cachefile.write(nexthash)
325
		cachefile.write(nexthash)

Return to bug 34738