Bug 4919 - Patch for a crash bug in LDB
Summary: Patch for a crash bug in LDB
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Andrew Bartlett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 08:13 UTC by Matthias Dieter Wallnöfer
Modified: 2007-08-26 19:32 UTC (History)
0 users

See Also:


Attachments
Here the proposed patch. The changes in ldb.c and ldb_tdb.c are only for stability reasons. (1.33 KB, patch)
2007-08-24 10:04 UTC, Matthias Dieter Wallnöfer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Dieter Wallnöfer 2007-08-24 08:13:17 UTC
When you change to the SAMBA private directory on a shell (default /usr/local/samba/private) and start there for example ldbedit with the sam.ldb, the application crashes if you don't put the "./" before the filename. I've now written three patches to avoid this.
Comment 1 Matthias Dieter Wallnöfer 2007-08-24 10:04:18 UTC
Created attachment 2881 [details]
Here the proposed patch. The changes in ldb.c and ldb_tdb.c are only for stability reasons.
Comment 2 Andrew Bartlett 2007-08-24 17:59:10 UTC
I've fixed the partition.c bug in -r 24655 - nice catch.  Is the URL ever actually NULL in ldb.c and ldb_tdb.c?

Comment 3 Matthias Dieter Wallnöfer 2007-08-25 01:46:42 UTC
Yes, the URL can be NULL if the function result of relative_path is NULL (and that can be!).
Comment 4 Andrew Bartlett 2007-08-26 19:32:35 UTC
I've fixed partition.c to ensure this can't happen in -r 24690