Bug 34499

Summary: mail/univention-mail-cyrus/cyrus.py: dead code
Product: UCS Reporter: Philipp Hahn <hahn>
Component: MailAssignee: Mail maintainers <mail-maintainers>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P5 CC: gohmann
Version: UCS 3.2Flags: hahn: Patch_Available+
Target Milestone: ---   
Hardware: All   
OS: Linux   
What kind of report is it?: Development Internal What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional): Cleanup
Max CVSS v3 score:

Description Philipp Hahn univentionstaff 2014-04-08 12:18:19 CEST
since r28653 of Bug #24273 every handler already gets it own private copy, so there's no longer the need to do it manually:

diff --git a/branches/ucs-3.2/ucs-3.2-1/mail/univention-mail-cyrus/cyrus.py b/branches/ucs-3.2/ucs-3.2-1/mail/univention-mail-cyrus/cyrus.py
index 5174356..36c6dd2 100644
--- a/branches/ucs-3.2/ucs-3.2-1/mail/univention-mail-cyrus/cyrus.py
+++ b/branches/ucs-3.2/ucs-3.2-1/mail/univention-mail-cyrus/cyrus.py
@@ -40,7 +40,6 @@ import pwd
 import grp
 import subprocess
 import glob
-import copy
 import cPickle
 
 name='cyrus'
@@ -167,9 +166,6 @@ def handler(dn, new, old, command):
 	fqdn = '%s.%s' % (listener.baseConfig['hostname'], listener.baseConfig['domainname'])
 	fqdn = fqdn.lower()
 
-	# copy object "old" - otherwise it gets modified for other listener modules
-	old = copy.deepcopy(old)
-
 	# do nothing if command is 'r' ==> modrdn
 	if command == 'r':
 		listener.setuid(0)
@@ -210,7 +206,7 @@ def handler(dn, new, old, command):
 			listener.unsetuid()
 			return
 
-		listener.unsetuid()	
+		listener.unsetuid()
 
 
 	# new
@@ -218,7 +214,7 @@ def handler(dn, new, old, command):
 		newHomeServer = new.get('univentionMailHomeServer', [''])[0]
 		newMailPrimaryAddress = new.get('mailPrimaryAddress', [''])[0]
 		if newHomeServer.lower() == fqdn:
-			# create mailbox if we are the home server 
+			# create mailbox if we are the home server
 			if newMailPrimaryAddress:
 				create_cyrus_mailbox(newMailPrimaryAddress.lower())
Comment 1 Stefan Gohmann univentionstaff 2017-06-16 20:40:41 CEST
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.

If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Comment 2 Stefan Gohmann univentionstaff 2017-08-08 07:11:14 CEST
This issue has been filed against UCS 3.2.

UCS 3.2 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.