0836138 bak2db gets stuck in infinite loop

Authored and Committed by rmeggins 12 years ago
    bak2db gets stuck in infinite loop
    
    https://fedorahosted.org/389/ticket/4
    Reviewed by: nkinder (Thanks!)
    Branch: master
    Fix Description: The logic was just plain faulty, so I rewrote the algorithm
    and made it much simpler.
    for each curr_ent: /* entry in current dse.ldif */
      for each old_ent: /* entry in dse_index.ldif in backup */
        if curr_ent.dn == old_ent.dn:
          modify curr_ent to look like old_ent
          curr_ent.inboth = old_ent.inboth = True
    
    for each old_ent:
      if old_ent.inboth:
        clear old_ent.inboth
      else: /* old_ent not in current config */
        add old_ent to current dse.ldif
    
    for each curr_ent:
      if curr_ent.inboth:
        clear curr_ent.inboth
      else: /* curr_ent not in old config */
        delete curr_ent from current dse.ldif
    
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no
    
        
file modified
+52 -101