Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Results 1 to 3 of 3
  1. #1
    steinb Guest

    Default Duplicate members cause some groups to fail

    I've installed oxldapsync from http://software.open-xchange.com/OX6...po/DebianEtch/ on a lenny-based OX6 system. Although this setup is not supported, I think my observation might be of interest:

    When I sync groups from LDAP to OX, some of them fail due to duplicate members of those groups. E.g. I have a group "exmitarb" which holds 33 members, but the resulting creategroup command contains an "-a" list that holds 39 IDs, of which 6 are duplicates.

    The perl code that grabs the groupshash from LDAP seems to be ok. However, I must say, that I am not perl guru. So far, I ended up with this small patch, which works for me, but maybe, someone else knows a better solution.

    Code:
    --- /opt/oxldapsync/lib/OX/Group/Helper.pm	2009-04-06 17:35:18.000000000 +0200
    +++ Helper.pm	2009-05-13 16:56:58.000000000 +0200
    @@ -216,9 +216,12 @@
     	my @currentmembers = split(",",$groups[$self->findGroup($group)]{'members'});
     
     	my @newmemberuids;
    +	my %is_done;
     
     	for (my $idx=0;$members[$idx];$idx++) 
     	{
    +          if (! $is_done{$members[$idx]}) {
    +	    $is_done{$members[$idx]} = 1;
     	    if (defined(my $uid = $self->findUser($members[$idx])))
     	    {	
     		if ((my $memidx = $self->isMember($users[$uid]{'id'}, @currentmembers)) > -1 )
    @@ -228,6 +231,7 @@
     		    push @newmemberuids, $users[$uid]{'id'};
     		}
     	    }
    +          }
     	}
     
     	if ($#currentmembers > -1 )
    -frank

  2. #2
    steinb Guest

    Default

    Just a short reminder to the developers...
    The problem still exists as of today (current Debian Lenny release). However, the patch I supplied in May seems to not fix it completely. Some groups still do net get created. But when the already exist, their lists of member get fixed upon the next run.

  3. #3
    Carsten Hoeger is offline Open-Xchange Professional Services
    Join Date
    Mar 2007
    Posts
    703

    Default

    Bugs should be reported using bugzilla.
    I just reported this one:

    https://bugs.open-xchange.com/show_bug.cgi?id=14490
    OXpedia.org - the answer to almost all questions.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •