Package: libnet-ldap-perl
Version: 1:0.34-1
Severity: normal
Tags: patch
The following script will produce a broken ldif file:
---
#!/usr/bin/perl
use warnings;
use strict;
use Net::LDAP::LDIF;
use Net::LDAP::Entry;
my $ldif = Net::LDAP::LDIF->new("test.ldif", "w", onerror => 'die',
'change' => 1, 'sort' => 1, 'wrap' => 0);
my $entry = Net::LDAP::Entry->new;
$entry->dn("ou=test");
$entry->delete();
$ldif->write_entry($entry);
$ldif->done();
---
The problem manifests itself if the 'wrap' attribute is set to 0.
According to the documentation, setting it to a value lower or equal 40 inhibits
wrapping. The following patch fixes the code:
---------------
--- /tmp/LDIF.pm.orig 2007-02-11 00:44:18.000000000 +0100
+++ /tmp/LDIF.pm 2007-08-02 14:50:08.509185568 +0200
@@ -385,7 +385,7 @@
sub _wrap {
my $len=$_[1];
- return $_[0] if length($_[0]) <= $len;
+ return $_[0] if ($len <= 40 || length($_[0]) <= $len);
use integer;
my $l2 = $len-1;
my $x = (length($_[0]) - $len) / $l2;
---------------
CU Micha
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.21-2-k7 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libnet-ldap-perl depends on:
ii libconvert-asn1-perl 0.20-1 Perl module for encoding and decod
ii libwww-perl 5.805-1 WWW client/server library for Perl
ii perl [libmime-base64-perl] 5.8.8-7 Larry Wall's Practical Extraction
libnet-ldap-perl recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]