Bug 7914 - ldbedit doesn't correctly handle errors
ldbedit doesn't correctly handle errors
Product: Samba 4.0
Classification: Unclassified
Component: Tools
x86 Linux
: P3 normal
: ---
Assigned To: Andrew Bartlett
Depends on:
  Show dependency treegraph
Reported: 2011-01-13 19:23 UTC by Brad Hards
Modified: 2011-02-09 12:59 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Brad Hards 2011-01-13 19:23:09 UTC
When using ldbedit (from s4 master), if the resulting LDIF is not parsed correctly, then the rest of the records are removed.

I've reproduced this problem by inserting a "+" sign into the DN.

That results in:
Error: Unable to parse dn 'CN=work+,CN=Profiles'
# 0 adds  0 modifies  5 deletes

(where those 5 deletes are the record I'm editing, plus any following records)

It would be better if ldbedit provided the warning/error message and didn't make any changes to the database.

The error message might be slightly better if it also had a line number, but that is much less important.
Comment 1 Matthias Dieter Wallnöfer 2011-01-20 04:44:18 UTC
Patch is currently under review.
Comment 2 Matthias Dieter Wallnöfer 2011-02-09 12:59:12 UTC
The fix has made it to "master": http://gitweb.samba.org/samba.git/?p=samba.git;a=commitdiff;h=79d3532f7f905afe1a48acabf75247cef6f791e3

Hope that this is resolved.