Bug 8716 - ldbmodify does not work with CRLF line terminators
Summary: ldbmodify does not work with CRLF line terminators
Status: NEW
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: samba4-qa@samba.org
Depends on:
Reported: 2012-01-24 10:20 UTC by Björn Baumbach
Modified: 2015-05-05 07:46 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Baumbach 2012-01-24 10:20:52 UTC
If I try to modify my AD using ldif files from Windows I get errors like:

'rror: Unable to parse dn '.....

Steps to reproduce:
cat $ldiffromwindows.ldf | ldbmodify -H $sambaprefix/private/sam.ldb --option="dsdb:schema update allowed=yes"

Workaround: Convert your ldifs with unix2dos
Comment 1 Andrew Bartlett 2012-10-18 07:21:18 UTC
This isn't a blocker for 4.0.  ldb* are unix utilities, LF is reasonable to expect.
Comment 2 Andrey Repin 2015-05-05 07:46:45 UTC
http://tools.ietf.org/html/rfc2849 explicitly allow CR LF as SEP (line separator).
Furthermore, the standard imply that any trailing whitespaces are to be ignored when reading from file. Only leading whitespaces needs to be preserved, and only in case of line folding (see "Formal Syntax Definition of LDIF", Note 2, that indirectly imply that the part of line after folding may contain leading whitespaces, which are to be preserved, and Note 8, that explicitly states that no trailing whitespaces allowed inline, which also indirectly applies to the folded lines).