The Samba-Bugzilla – Attachment 2881 Details for
Bug 4919
Patch for a crash bug in LDB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Here the proposed patch. The changes in ldb.c and ldb_tdb.c are only for stability reasons.
ldb.patches (text/plain), 1.33 KB, created by
Matthias Dieter Wallnöfer
on 2007-08-24 10:04:18 UTC
(
hide
)
Description:
Here the proposed patch. The changes in ldb.c and ldb_tdb.c are only for stability reasons.
Filename:
MIME Type:
Creator:
Matthias Dieter Wallnöfer
Created:
2007-08-24 10:04:18 UTC
Size:
1.33 KB
patch
obsolete
>Index: lib/ldb/common/ldb.c >=================================================================== >--- lib/ldb/common/ldb.c (revision 24649) >+++ lib/ldb/common/ldb.c (working copy) >@@ -115,7 +115,7 @@ > char *backend; > ldb_connect_fn fn; > >- if (strchr(url, ':') != NULL) { >+ if ((url) && (strchr(url, ':') != NULL)) { > backend = talloc_strndup(ldb, url, strchr(url, ':')-url); > } else { > /* Default to tdb */ >Index: lib/ldb/ldb_tdb/ldb_tdb.c >=================================================================== >--- lib/ldb/ldb_tdb/ldb_tdb.c (revision 24649) >+++ lib/ldb/ldb_tdb/ldb_tdb.c (working copy) >@@ -1010,8 +1010,8 @@ > struct ltdb_private *ltdb; > > /* parse the url */ >- if (strchr(url, ':')) { >- if (strncmp(url, "tdb://", 6) != 0) { >+ if ((!url) || (strchr(url, ':'))) { >+ if ((!url) || (strncmp(url, "tdb://", 6) != 0)) { > ldb_debug(ldb, LDB_DEBUG_ERROR, "Invalid tdb URL '%s'", url); > return -1; > } >Index: dsdb/samdb/ldb_modules/partition.c >=================================================================== >--- dsdb/samdb/ldb_modules/partition.c (revision 24649) >+++ dsdb/samdb/ldb_modules/partition.c (working copy) >@@ -724,7 +724,7 @@ > p[0] = '\0'; > } else { > talloc_free(path); >- return NULL; >+ path = talloc_asprintf(mem_ctx, "%s", "."); > } > full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name); > talloc_free(path);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4919
: 2881