[PATCH] Upgradeprovision fix for accessing a non-existant key

Lukasz Zalewski lukas at eecs.qmul.ac.uk
Wed Sep 15 07:34:19 MDT 2010


---
 source4/scripting/bin/upgradeprovision |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 6697c82..b050b1e 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -852,8 +852,10 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid):
                 # We have updated by provision usn information so let's exploit
                 # replMetadataProperties
                 if att in forwardlinked:
-                    handle_links(samdb, att, basedn, current[0]["dn"],
-                                    current[0][att], reference[0][att], delta)
+                    #only perform this if the reference equivalent of the attributer exists
+                    if att in reference[0]:
+                        handle_links(samdb, att, basedn, current[0]["dn"],
+                                        current[0][att], reference[0][att], delta)
 
                 if isFirst == 0 and len(delta.items())>1:
                     isFirst = 1
-- 
1.5.5.6


--------------020304060000060309020707--


More information about the samba-technical mailing list