examples:s2→s3-ldif-convert-script: fix objectclass recognition
authorBjörn Jacke <bj@sernet.de>
Fri, 12 Jun 2009 16:39:31 +0000 (18:39 +0200)
committerBjörn Jacke <bj@sernet.de>
Fri, 12 Jun 2009 16:46:46 +0000 (18:46 +0200)
objectclasses are case insensitive. we used to convert only LDAP objects with
the typical UpperLower case for sambaAccount and sambaGroupMapping and ignored
any other case writings

examples/LDAP/convertSambaAccount

index 4357dbc8f8db667c8a2063498807b60b23b21f67..8b522ef8ae82d0f19cc913f1281be0cb6d4f5a90 100755 (executable)
@@ -156,9 +156,9 @@ while ( !$ldif->eof ) {
        @adds = ();
        @dels = ();
        foreach $obj ( @objclasses ) {
-               if ( "$obj" eq "sambaAccount" ) {
+               if ( lc($obj) eq "sambaaccount" ) {
                        $is_samba_account = 1;
-               } elsif ( "$obj" eq "sambaGroupMapping" ) {
+               } elsif ( lc($obj) eq "sambagroupmapping" ) {
                        $is_samba_group = 1;
                }
        }