X-Git-Url: https://git.octo.it/?p=licom.git;a=blobdiff_plain;f=lib%2FLiCoM%2FGroup.pm;fp=lib%2FLiCoM%2FGroup.pm;h=a5cade9c5f779fa48ba910d76b79f1bfe8a2894a;hp=39fd540d0d56a82f3edbf99cda637785c3d6b95b;hb=89c58aa0c99bc2fd168fda98891ac2962ff16c94;hpb=6da463204f0e7002e9f43e1492846833b60457a0 diff --git a/lib/LiCoM/Group.pm b/lib/LiCoM/Group.pm index 39fd540..a5cade9 100644 --- a/lib/LiCoM/Group.pm +++ b/lib/LiCoM/Group.pm @@ -47,7 +47,7 @@ sub load my $mesg = $Ldap->search ( - base => get_config ('base_dn'), + base => 'ou=Group,' . get_config ('base_dn'), filter => "(&(objectClass=groupOfNames)(cn=$name))" ); @@ -76,7 +76,7 @@ sub load_by_member my $mesg = $Ldap->search ( - base => get_config ('base_dn'), + base => 'ou=Group,' . get_config ('base_dn'), filter => "(&(objectClass=groupOfNames)(member=$dn))" ); @@ -110,7 +110,7 @@ sub create ($$$@) my $desc = shift; my @members = @_; my $dn = _cn_to_dn ($name); - my ($ou) = get_config ('base_dn') =~ m/\bou\s*=\s*([^,]+)/i; + my $ou = 'Group'; my $entry = Net::LDAP::Entry->new (); @@ -146,7 +146,7 @@ sub all my $mesg = $Ldap->search ( - base => get_config ('base_dn'), + base => 'ou=Group,' . get_config ('base_dn'), filter => "(objectClass=groupOfNames)" ); @@ -308,7 +308,7 @@ sub _cn_to_dn my $cn = shift; my $base_dn = get_config ('base_dn') or die; - return ('cn=' . $cn . ',' . $base_dn); + return ('cn=' . $cn . ',ou=Group,' . $base_dn); } sub _update_members