Issue 8345 - inconsistencies regarding LDIF line length
Summary: inconsistencies regarding LDIF line length
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: 2.5.3
Assignee: Ondřej Kuzník
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-31 22:57 UTC by Ryan Tandy
Modified: 2021-04-01 04:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ryan Tandy 2015-12-31 22:57:12 UTC
Full_Name: Ryan Tandy
Version: master, 2.4
OS: Debian
URL: 
Submission from: (NULL) (24.68.37.4)
Submitted by: ryan


This is sort of a follow-up to ITS#7871.

ldif_sput gained an LDIF_KLUDGE, but ldif_put did not, so the latter now wraps
at 76 columns instead of 78.

(IMO ldif_sput and ldif_put could both just pass 0 for wrap instead of a
specific number, and let ldif_sput_wrap set the default.)

LDIF_SIZE_NEEDED still assumes wrapping to LDIF_LINE_WIDTH columns, so code that
does LDIF_SIZE_NEEDED and then ldif_sput is now allocating (slightly) more
memory than it actually needs. 389-ds does this, for example.

(And actually, couldn't LDIF_SIZE_NEEDED just be a thinner wrapper around
LDIF_SIZE_NEEDED_WRAP?)

Not sure exactly what the policies are around API changes in exposed headers,
but for 2.5, maybe LDIF_LINE_WIDTH could change to 78 and LDIF_KLUDGE could go
away entirely? Should I take this part to -devel?

BTW, is it still necessary for ldif.c to re-implement base64 instead of using
the lutil functions?
Comment 1 Quanah Gibson-Mount 2017-04-04 00:34:52 UTC
changed notes
Comment 2 OpenLDAP project 2017-04-04 00:38:10 UTC
See also ITS#7859
base64 functions question needs resolution
Comment 3 Quanah Gibson-Mount 2017-04-04 00:38:10 UTC
changed notes
moved from Incoming to Software Bugs
Comment 4 Ondřej Kuzník 2020-03-31 07:32:07 UTC
That sounds fine by me.

BTW liblutil is currently a static-only library, which is why none of the libldap code uses it. Same issue I'm hitting with using AVL code in ITS#9001
Comment 5 Quanah Gibson-Mount 2021-01-25 17:51:51 UTC
Ondrej to do suggested patch. Larger issues around issue#9001 still need resolving separately.
Comment 6 Quanah Gibson-Mount 2021-03-03 18:53:11 UTC
Commits: 
  • 56823973 
by Ondřej Kuzník at 2021-03-03T10:37:19+00:00 
ITS#8345 Remove LDIF_KLUDGE and defer defaults to _wrap()