Skip to content

Commit

Permalink
Do not use 0 as attribute name in LDIF (references #768)
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed May 27, 2015
1 parent 63de1c1 commit 2bb6fd3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions file2ldif.pl
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@
uniqueMember => 'cn=empty',
},
c_person => {
dn => 'uid={0},ou=users,dc=example,dc=com',
dn => 'uid={1},ou=users,dc=example,dc=com',
objectClass =>
[ 'top', 'person', 'organizationalPerson', 'inetOrgPerson' ],
uid => '{0}',
givenName => '{1}',
sn => '{2}',
cn => '{1} {2}',
uid => '{1}',
givenName => '{2}',
sn => '{3}',
cn => '{2} {3}',
},
c_group => {
dn => 'cn={0},ou=groups,dc=example,dc=com',
dn => 'cn={1},ou=groups,dc=example,dc=com',
objectClass => [ 'top', 'groupOfUniqueNames' ],
cn => '{0}',
uniqueMember => 'uid={1},ou=users,dc=example,dc=com',
cn => '{1}',
uniqueMember => 'uid={2},ou=users,dc=example,dc=com',
},
};

Expand Down Expand Up @@ -141,7 +141,7 @@
for my $i ( 0 .. $#columns ) {
my @values =
split( /\Q$csv_multivalues_delimiter\E/, $columns[$i] );
$entry->add( $i => \@values );
$entry->add( $i + 1 => \@values );
}
$inldif->write_entry($entry);
}
Expand Down

0 comments on commit 2bb6fd3

Please sign in to comment.