[Pkg-openldap-devel] [openldap] 01/17: * Add code to fix_ldif to fix up oddly formatted integer attribs; limited use because it only fixes those attributes that we have prior knowledge of (i.e., those in the default schemas we ship), but it's something at least. Closes: #302629.
Timo Aaltonen
tjaalton-guest at alioth.debian.org
Thu Oct 10 05:35:57 UTC 2013
This is an automated email from the git hooks/post-receive script.
tjaalton-guest pushed a commit to annotated tag 2.2.23-5
in repository openldap.
commit 4689c54837702e11a2fd3e8be4871a9399386e90
Author: Steve Langasek <vorlon at debian.org>
Date: Fri Apr 22 08:48:55 2005 +0000
* Add code to fix_ldif to fix up oddly formatted integer attribs;
limited use because it only fixes those attributes that we have
prior knowledge of (i.e., those in the default schemas we ship), but
it's something at least. Closes: #302629.
---
debian/changelog | 6 ++++++
debian/fix_ldif | 34 +++++++++++++++++++++++++++++++++-
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index ce98ee9..8e7f58f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,12 @@ openldap2.2 (2.2.23-4) unstable; urgency=low
* debian/slapd.scripts-common: Remove the alert_user function which
was there to output an error message in case debconf is not available.
+ Steve Langasek <vorlon at debian.org>:
+ * Add code to fix_ldif to fix up oddly formatted integer attribs;
+ limited use because it only fixes those attributes that we have
+ prior knowledge of (i.e., those in the default schemas we ship), but
+ it's something at least. Closes: #302629.
+
--
openldap2.2 (2.2.23-3) unstable; urgency=low
diff --git a/debian/fix_ldif b/debian/fix_ldif
index 9e90c36..68eeb51 100644
--- a/debian/fix_ldif
+++ b/debian/fix_ldif
@@ -361,7 +361,14 @@ sub canon
}
#
-# Check required attributes.
+# Check required attributes, and fix up known attributes for which the
+# syntax has changed
+# Bad hack: the "fix up" should be replaced by something which knows
+# about schemas and can fix all instances for all attributes of the
+# relevant attribute syntax (1.3.6.1.4.1.1466.115.121.1.27). For now,
+# we only check the most commonly affected attributes, which we also
+# happen to know are SINGLE-VALUE (with the exception of
+# mailPreferenceOption and ipServiceProtocol).
#
sub checkattrs
{
@@ -386,6 +393,10 @@ sub checkattrs
print STDERR "\n\n";
}
}
+ foreach my $attr (@integer) {
+ ${$entries{$dn}{$attr}}[0] = 0)
+ if (${$entries{$dn}{$attr}}[0] =~ /^0+/);
+ }
}
#
@@ -521,6 +532,27 @@ sub INIT
);
#
+ # Integer attributes
+ #
+ @integer =
+ (
+ 'uidNumber',
+ 'gidNumber',
+ 'mailPreferenceOption',
+ 'shadowLastChange',
+ 'shadowMin',
+ 'shadowMax',
+ 'shadowWarning',
+ 'shadowInactive',
+ 'shadowExpire',
+ 'shadowFlag',
+ 'ipServicePort',
+ 'ipServiceProtocol',
+ 'ipProtocolNumber',
+ 'oncRpcNumber',
+ };
+
+ #
# Random stuff.
#
$/ = ""; # Read input in paragraph mode
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git
More information about the Pkg-openldap-devel
mailing list