Univention Bugzilla – Attachment 3291 Details for
Bug 18619
Performance-Optimierung des AD Connectors in grossen Umgebungen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ad-connector.py.patch
ad-connector.py.patch (text/plain), 1.60 KB, created by
Stefan Gohmann
on 2011-05-25 12:02:09 CEST
(
hide
)
Description:
ad-connector.py.patch
Filename:
MIME Type:
Creator:
Stefan Gohmann
Created:
2011-05-25 12:02:09 CEST
Size:
1.60 KB
patch
obsolete
>Index: ad-connector.py >=================================================================== >--- ad-connector.py (Revision 24255) >+++ ad-connector.py (Arbeitskopie) >@@ -39,9 +39,15 @@ > filter='(objectClass=*)' > attributes=[] > >+ > # use the modrdn listener extension > modrdn="1" > >+# While initialize copy all group objects into a list: >+# https://forge.univention.org/bugzilla/show_bug.cgi?id=18619#c5 >+init_mode = False >+group_objects = [] >+ > dirs = [listener.baseConfig['connector/ad/listener/dir']] > if listener.baseConfig.has_key('connector/listener/additionalbasenames') and listener.baseConfig['connector/listener/additionalbasenames']: > for configbasename in listener.baseConfig['connector/listener/additionalbasenames'].split(' '): >@@ -54,6 +60,8 @@ > > def handler(dn, new, old, command): > >+ global group_objects >+ > listener.setuid(0) > try: > for directory in dirs: >@@ -76,6 +84,9 @@ > object=(dn, new, old, old_dn) > > filename=os.path.join(directory,"%f"%time.time()) >+ >+ if new and 'univentionGroup' in new.get('objectClass', []): >+ group_objects.append(object) > > f=open(filename, 'w+') > os.chmod(filename, 0600) >@@ -102,7 +113,24 @@ > finally: > listener.unsetuid() > >+def postrun(): >+ global init_mode >+ if init_mode: >+ listener.setuid(0) >+ try: >+ init_mode = False >+ for object in group_objects: >+ for directory in dirs: >+ filename=os.path.join(directory,"%f"%time.time()) >+ f=open(filename, 'w+') >+ os.chmod(filename, 0600) >+ cPickle.dump(object, f) >+ f.close() >+ finally: >+ listener.unsetuid() > > def initialize(): >+ global init_mode >+ init_mode = True > clean() >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18619
:
3139
| 3291 |
3292